Open zta6 opened 3 weeks ago
Thanks for taking the time to open this issue! Can you check if this ever worked as expected in previous version that contain the terrain feature? Also, can you please create a minimal jsbin/codepen/stackblitz reproduction, preferably with minimum number of layers?
I went back as far as 3.0.0 and as far forward as 4.7.0 and the issue exists in both those version as well as in 4.3.2 which we're using.
I'm not sure how I'd create a demo unless I can find a tile server that returns (some) 404s dependably, or without control over the code on the tile server itself which isn't possible with a demo tileset hosted by someone else.
I think you can use addProtocol to return 404 somehow? Or maybe transformRequest to specific tiles, just for the sake of a small reproduction...?
maplibre-gl-js version: 4.3.2, observed in 3.0.0 as well.
browser: Observed in Chrome and Safari
Steps to Trigger Behavior
A related note: If I set
maxTileCacheZoomLevels
to 1, ormaxTileCacheZoomSize
to 0 it seems to make this issue less pronounced. It seems as if the lower resolution tiles that are being loaded in response to 404s are coming from the cache. Restricting/removing the cache results in a smaller degradation of resolution in response to 404s, since there are no low-zoom tiles in the cache to fall back to. At least thats what it seems like to me.Link to Demonstration
Had to reduce the resolution of this to upload to github so it's a bit hard to see, but if you watch the top left corner of the map you can see the gray 'no coverage' area at around the 5 second mark. Whether or not that no coverage area is in the mapview is what determines whether the mapviewer is blurry or clear.
https://github.com/user-attachments/assets/7bcabb8e-1be6-47c6-ab09-02e32091c791
Expected Behavior
The map responds gracefully to 404s
Actual Behavior
The map's resolution degrades significantly in response to 404s.