Mapsui
Mapsui copied to clipboard
Raster tile layer with persistent storage backing
I'm unsure if this is a BruTile-related thing or a Mapsui thing, and I suspect there may be some bugs here (as discussion goes on, I will consider trying to make a repro):
I have created an HttpTileSource with an mbtiles sqlite database as a persistent storage backing. Thing is, most of the time this layer will be operating offline. I noticed that when I create one, it will stop showing tile levels when zooming out, even if there is no tile at a lower zoom level to replace it. It seems to work fine in reverse, when zooming in...
Is there a way to tell Mapsui to continue to draw the old tile until if/when the lower zoom level tile is loaded? It seems to use this behavior in the regular MbTilesSource, but not in HttpTileSource with persistent storage.
Another potentially related issue is that sometimes the layer just plain disappears, but let's handle one thing at a time...
EDIT: I should note that this functionality I describe already exists in the UWP version of Mapsui and works GREAT! iOS is a different story.
There is distinction between zooming-in and zooming-out. When zooming-out we do not want to show all the lower level tiles because they can be way to many and performance will come to a halt.
There are two interfaces related to your issue that you could use.
- IFetchStrategy. It determines which tiles are loaded from the server.
- IRenderGetStrategy. It determines which tiles are used while drawing.
You can inject your own version of those interfaces to alter the behavior you describe.
.... but actually I do not at all expect a difference between iOS and UWP, so maybe there is an another issue at play.
Right-- When zooming out, UWP does indeed continue to draw lower level tiles. iOS does not. It's curious to me why the behavior isn't consistent.
Is the difference perhaps between mousewheel versus pinch-out?
This was reported before the first beta of v4. Assuming this is fixed now.