maplibre / maplibre-native

MapLibre Native - Interactive vector tile maps for iOS, Android and other platforms.
https://maplibre.org
BSD 2-Clause "Simplified" License
1.07k stars 314 forks source link

Tiles outside of metadata bounds not loading #1318

Open nnhubbard opened 1 year ago

nnhubbard commented 1 year ago

Describe the bug When using an offline .mbtiles file in iOS, zooming out to world view and then zooming into areas that are not within the mbtiles bounds, some tiles are not shown. The tiles will flash but not load.

To Reproduce

  1. View a .mbtiles file
  2. Zoom around and away from the target map area

Expected behavior Entire world should be shown in low resolution, even when zooming in. Tiles in those locations should not disappear.

Actual behavior Tiles dissapear or flash in locations outside of the mbtiles target area. This didn't used to happen.

Screenshots What is happening: 54715007-9a7d3400-4b0f-11e9-80df-c3efc5669d23

What it should look like: 54714973-89ccbe00-4b0f-11e9-816a-4269d0891cf1

Platform information (please complete the following information):

Additional context This issue was fixed in the MapTiler fork, but that is private so I am not sure I can share the code here.

nnhubbard commented 1 year ago

@louwers can this be looked into at some point?

nnhubbard commented 1 year ago

@roblabs Have you ever had this issue?

acalcutt commented 1 year ago

Is this really an issue with maplibre? it seems normal to me when you trim a mbtiles file to certain bounds. Some software seems like they show the full tile that contain your bounds, as you lower the zoom the tiles get bigger so it shows more as you zoom out.

Take for example this swiss terrain rgb I made recently. When you are zoomed out the is tile covers a much bigger area, but as you zoom in that area gets smaller because the tiles get smaller https://tiles.wifidb.net/data/swissalti3d_terrarium_0-17/#1/41/8

I have also seen like you are describing with vector tiles. For example, in tileserver we use this demo file https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/zurich_switzerland.mbtiles which seems to be trimmed similarly to yours above. as you zoom in the area covered is less, because less tiles are needed to show the bound area.

acalcutt commented 1 year ago

You can also see what I am talking about in this OMT demo that I had created with planetiler. https://demotiles.maplibre.org/tiles-omt/#14/47.26475/11.40416 . When I made the demo omt tiles there I bound them to the area around innsbruck, but you can see as you zoom out the tiles get bigger and more area is covered.

louwers commented 1 year ago

This didn't used to happen

Do you know which version still had the 'expected behavior'?