Add "follow user heading" state to map #790
Replies: 1 comment
-
I think the best way to implement this is by adding a 3rd state to the "locate" button: Currently there are two states:
Currently interacting with the map will put the map into state (1). Pressing the locate button in the bottom-right will put the map back into state 2. In Google Maps and Apple Maps pressing the "Locate" button when it is in state (2) (follow-mode) will put the map into "follow heading" mode, e.g. the map will rotate to follow the user heading. Mapbox supports this mode in the
Option 2 (follow course) is more reliable when the user is moving fast (e.g. in a car) because the magnetometer is subject to other magnetic fields and calibration issues. However, when walking and with poor GPS signal, Option 2 (follow course) is likely to be unreliable, so Option 1 is probably a better option for our case. I think that Apple and Google maps automatically move between heading and course based on reading the phone movement sensors. This might be an option for us in the future. Finally, currently we do not use the native "follow mode" from Mapbox maps, in order to reduce battery usage, because it resulted in frequent redraws of the map which was using lots of CPU. Instead when in the follow location mode the map updates every time the GPS displaces by 10m or more. We can keep this behaviour, and switch to the native map heading mode only when the user switches into follow heading state. |
Beta Was this translation helpful? Give feedback.
-
"Is it possible to make the map rotate as you move to help with navigation to points you want to visit again. Has been using it a lot in the RCA, but this would help, to at least know what direction you are moving in."
Requested by David
Beta Was this translation helpful? Give feedback.
All reactions