rnmapbox / rnmapbox/maps

[Bug]: Follow user location is lost when zooming the map in/out

Open
#3,115 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Kotlin
Stars
2.9k
Forks
947
Avg merge
6d 37m
Merged PRs (30d)
1

Description

Mapbox Implementation

Mapbox

Mapbox Version

default

Platform

iOS, Android

@rnmapbox/maps version

10.0.0-beta.11

Standalone component to reproduce
// This example shows the bug
// https://github.com/rnmapbox/maps/blob/main/example/src/examples/UserLocation/UserLocationRenderMode.tsx
Observed behavior and steps to reproduce

When in follow user location and I zoom in/out, the follow user location mode is lost and the user needs to reactivate the follow user location.

This applies in the following zoom scenarios:

  • Double tap to zoom in
  • 2-finger double tap to zoom out
  • Pinch in to zoom in
  • Pinch out to zoom out

See this example video of the issue (play it with sound):

https://github.com/rnmapbox/maps/assets/2103778/ced041c7-a6f1-40f2-a352-c521bdbd6e3d

Expected behavior

In the pre-v10 RN mapbox library this was not happening, as the follow user location was kept when zooming.

This is also how both apple and google maps works, and I think this is how RN mapbox should also work. I also tested the Mapbox sample app available in the Android app store, and there it works like Apple and Google maps apps.

I have attached a video of our app that shows how it worked before the v10 update. Turn on sound as I explain the issue in the video too.

https://github.com/rnmapbox/maps/assets/2103778/3071e5b2-add0-4499-b314-fa57e6fc78ee

Notes / preliminary analysis

No response

Additional links and references

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with example/src/examples/UserLocation/UserLocationRenderMode.tsx and reproduce the issue on iOS and Android using the listed zoom gestures. Trace how follow-user-location state changes during zooming, then verify that the mode remains active after each gesture and matches the pre-v10 behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.