-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onStyleLoadedCallback invoked multiple times #330
Comments
@AAverin On what platform and with which kind of style are you experiencing this? I'd expect it to be only invoked once but as far as I know that's not something we explicitly guarantee. |
This callback is called every time you change the map style and this is been loaded |
@m0nac0 on android, will need to check on ios. |
OK, I have found what's the problem. This kind of brings me back to #245 My use case. I have lots of markers on the map and I want to have a route in the app that will open the map tab and focus on a specific marker. I should be able to do this from any screen, which is why I am now using Navigator. |
Same problem happens if I just have multiple different maps on different screens. |
Looks like added markers also persist between different maps as if either nothing was destroyed or there is indeed a single map in the background and I should expect this on the flutter side when using multiple maps - clear map instance between screens, expect multiple calls to Anything else to expect? |
#315 should fix it Try to use master branch |
@andrea689 Indeed, works great on |
Is there a guarantee that
onStyleLoadedCallback
will be invoked only once to indicate that the map is ready or it can be invoked multiple times?At the moment it gets invoked 7 times for me when map is created and I can't understand why.
The text was updated successfully, but these errors were encountered: