Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map blurs in response to 404s when terrain is enabled #4692

Open
zta6 opened this issue Sep 11, 2024 · 3 comments
Open

Map blurs in response to 404s when terrain is enabled #4692

zta6 opened this issue Sep 11, 2024 · 3 comments
Labels
need more info Further information is requested

Comments

@zta6
Copy link

zta6 commented Sep 11, 2024

maplibre-gl-js version: 4.3.2, observed in 3.0.0 as well.

browser: Observed in Chrome and Safari

Steps to Trigger Behavior

  1. Display a layer with limited geographic coverage, or a layer that returns 404s intermittently
  2. Turn on terrain
  3. If viewing a layer with limited geographic coverage, navigate to the edge of the layer.
  4. Observe that when the uncovered areas are visible (i.e. 404s are being received) that the rest of the layer blurs in response to those 404s.

A related note: If I set maxTileCacheZoomLevels to 1, or maxTileCacheZoomSize 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.

LowerRes.mov

Expected Behavior

The map responds gracefully to 404s

Actual Behavior

The map's resolution degrades significantly in response to 404s.

@HarelM
Copy link
Collaborator

HarelM commented Sep 11, 2024

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?

@HarelM HarelM added the need more info Further information is requested label Sep 11, 2024
@zta6
Copy link
Author

zta6 commented Sep 12, 2024

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.

@HarelM
Copy link
Collaborator

HarelM commented Sep 13, 2024

I think you can use addProtocol to return 404 somehow?
Or maybe transformRequest to specific tiles, just for the sake of a small reproduction...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants