Closed aurelientymate closed 3 years ago
Hi, I'd like to better understand your need. At some point, the tiles change even when not panning or zooming, and you'd like to trigger a reload of all visible tiles. Is that correct? This is something that could be implemented in a future version.
Yes, i would like to refresh all visible tiles on button click. As if on a real map, you would like to go from plan to satellite view for example.
I see. I do the exact same thing in my own trekking app. Do do that, I destroy the existing MapView and add a new one to the view hierarchy using the same id. This way, new tiles are displayed while the new MapView has its state automatically restored using the state (zoom, pan) of the former MapView.
So, what I'm saying is: it's already possible using a not-so-handy technique.
A redrawTiles()
would be handy, and I'll see what I can do.
I used your method, destroying the map and add a new one with the same id works for me. Thank you for your help. Great job on this lib
@aurelientymate Hi, FYI the new 2.1.6 version has a redrawTiles() method on MapView that should work as you expect.
It works perfectly, exactly what i needed. Great job ! Thanks 👍
Thanks for the feedback!
Hi, is there a way to force refresh the map tiles. Right now, i use
redrawTiles
when i need a refresh. But it's only trigger a refresh on map zoom/dezoom or on map movements. So, is it possible to force redraw tiles when the function is called ? Thanks