You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 11, 2021. It is now read-only.
When adding UserLocationOptions to the map layers it causes my map markers to rebuild every second which has a performance issue since I'm adding hundreds of Markers to the map. The same thing happens when zooming/panning the map but that's more understandable as this requires the markers to be redrawn.
Steps to reproduce the behaviour:
Add Markers to a flutter_map
Add UserLocationOptions to the layers
Add debug code to print out the Marker build function
I have tried setting a higher value in locationUpdateIntervalMs to reduce the frequency of the rebuild but that does not seem to reduce the frequency or the rebuild. This is on a physical Android device.
Interested to know if this is by design, any easy way around it or I need to look on how my Markers are build?
TIA!
The text was updated successfully, but these errors were encountered:
The reason you are facing performance issues might be because we rebuild all the markers every locationUpdateIntervalMs, not when the map moves or you zoom in/out.
This is a problem in the plugin itself I guess, and we would need to make changes to how markers are rendered, one quick try could be to delete and add only those markers whose position is changed and see if that changes anything
I am quite busy with my exams, as of now, I am really sorry I am not able to work on this issue as of now. Please, write back if you found a solution to the issue, and once again thank you for this issue.
No worries, I will try to find a way in the meantime. I'm beginner/intermediate with Flutter so just wanted to see if I was doing something terrible wrong or not. I'll keep you updated. Good luck with the exams!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When adding
UserLocationOptions
to the map layers it causes my map markers to rebuild every second which has a performance issue since I'm adding hundreds of Markers to the map. The same thing happens when zooming/panning the map but that's more understandable as this requires the markers to be redrawn.Steps to reproduce the behaviour:
UserLocationOptions
to the layersI have tried setting a higher value in
locationUpdateIntervalMs
to reduce the frequency of the rebuild but that does not seem to reduce the frequency or the rebuild. This is on a physical Android device.Interested to know if this is by design, any easy way around it or I need to look on how my Markers are build?
TIA!
The text was updated successfully, but these errors were encountered: