Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OSMdroid change TileSource at Runtime

i working with osmdroid and i want to change the TileSource at runtime (via menu entry). For example i can change between OSM TileSource and GoogleTileSource.

Problem: Everything works fine, but when i change the TileSource while the mapview is loading a Tile in the background, it changes the TileSource but one or two tiles are from the TileSource befor. So i see a mixed MapView with OSMTiles and one or two GoogleTiles.

The tileCache is cleared everytime after changing the TileSource. But the loading tile in the background isnt in the cache at this moment, so he put this tile to the cache, after clearing it.

Any Idea to workaround this issue?? It is all based on osmdroid, i only work with setTileSource(ITileSource)

Thanks and Greetz

like image 876
Informatic0re Avatar asked Sep 12 '26 06:09

Informatic0re


1 Answers

Looks like a proper bug to me. I think you should report it as such. I can not see anything like it in the issues list. It looks like the bad tile even gets into the wrong cache on the sd card which is bad as it will be there for a while.

like image 162
Ifor Avatar answered Sep 13 '26 21:09

Ifor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!