Open nnhubbard opened 2 weeks ago
Thanks for working on this. The behavior you describe sounds like the correct one, i.e., only show data from inside the bounds.
@louwers you might want to coordinate with @HarelM on how this behavior is done in MapLibre GL JS.
@wipfli Does MapLibre GL JS support reading local MBTiles?
MapLibre GL JS does not have offline mbtiles support. My think is that independent of the source - be it an offline mbtiles file or a zxy http endpoint - the behavior for unavailable tiles should be the same.
openmaptiles
, which many people use to create offline mbtiles
files will create a a world tile at z1
where you can see all continents, countries, etc. It makes sense to continue to show these as you zoom into different parts of the world using over zoom. Without that, an mbtiles
file would need to be created with world data on every other zoom level making the file significantly larger.
I don't understand why your changes implements the behavior you say it does. Could you explain it?
This small code change will, when receiving an error for no tile, instead allow the previous zooms tile to show instead of showing blank. E.g. overzoom.
Fixes issue #1318 where tiles outside of metadata bounds are not loading. This fix allows over zooming so that map features that are not on higher zoom levels will still show from their lower zoom level tiles.
For example, the offline mbtiles file might include world tiles in
z1
only, but when you zoom in farther those tiles are blank unless you move to the metadata bounds. With this fix, if you zoom into an area outside of the bounds you will get over zoom fromz1
which makes for a much nicer looking map without blank tiles.