-
-
Notifications
You must be signed in to change notification settings - Fork 75
[BUG] Tiles not updated when urlTemplate
changes if tile provider not reconstructed
#183
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
Comments
Hi @codeOfJannik, |
#182 has been updated to include the best solution to this problem, following the pattern of the FM tile providers. However, it relies upon a breaking change. I do not intend to release a breaking change yet, as the purpose/aim of the PR may be changed by an upcoming change to FM. The issue occurs because the Flutter image cache key assigned to the tile does not consider the URL template - this was missed during testing, since in the example app, it does not occur because the provider is reconstructed every time the URL is changed, and is not easy to fix without a breaking change because the internal image provider takes the entire There's a few workaround options:
|
urlTemplate
changes if tile provider not reconstructed
@JaffaKetchup Thanks for investigating and providing the workaround options! |
I've released v11.0.0-dev.2, so you can depend on that instead of Git (if you were using that option). It is unlikely to progress to a full release soon, see the description on the #182 PR. |
What is the bug?
When a FMTCTileProvider is used and the urlTemplate is switched during runtime, the rendered map tiles on the currently visible map area are not updated to the style of the new url template. Also emitting an event to the reset stream of the TileLayer does not force the layer to show the new style. But if you move around the map, new map tiles are rendered in the new style. So switching the url template in general works.
How can we reproduce it?
Do you have a potential solution?
No response
Platforms
tested on iOS device and Android emulator
Severity
Obtrusive: Prevents normal functioning but causes no errors in the console
The text was updated successfully, but these errors were encountered: