Replies: 2 comments 1 reply
-
Current workaround is to use conditional rendering for the UserLocation element :
But this will display the UserLocation only if it's updated which is not a problem on the device if handheld and with userheading enabled. |
Beta Was this translation helpful? Give feedback.
-
@Tiropz sorry I cannot see the video on that link - I get |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm building an app with a MapView and I'd like to have the camera centered on the user and following him when the map first load.
But I'm encountering weird behaviour when followUserLocation is set to true at start and that UserLocation is used
What is the problem
The map will load and I can move it around and the UserLocation is displayed correctly but the Camera won't be centered on the user position and be center on some random point in Africa ( (0,0) maybe ?). Then the UserLocation will update, calling onUpdate, and the camera will then be centered on the user. Sometimes this flow can take up to 1 min or more.
Link to a video that I hope you can access, showing the issue :
https://github.com/Tiropz/Tiropz/blob/main/363439962_6464920006907379_8923571196012967067_n.mp4
What have I tested
If I remove the UserLocation element, I do not have this problem anymore. The camera will be centered on the user coordinates and follow the user.
If I set followingUser to false, it will juste show me the whole globe, with the UserLocation still being displayed correctly of course.
My code
Here is my code :
What I want
To do understand how the UserLocation can influence the behaviour of the Camera when loading the MapView
@mfazekas I'm not sure this can be classified as a Bug, if so please tell me and I'll move it to the Bug section
Thank you all for your time !
Beta Was this translation helpful? Give feedback.
All reactions