Tiles with raster-fade-duration: 0
inappropriately held for underzooming
#2445
Labels
bug
Something isn't working
good first issue
Good for newcomers
PR is more than welcomed
Extra attention is needed
When you zoom out on a raster layer, MapLibre holds on to underzoomed child tiles for the "raster fade duration" so that it can apply a cross fade. In the case where the fade-duration is 0, it shouldn't hold onto them at all once the parent is loaded, but its logic to do that incorrectly always retains when fade-duration is 0:
maplibre-gl-js/src/source/source_cache.ts
Line 560 in c03607b
The tiles will stay in the pyramid potentially indefinitely, although only while in the viewport and within the "max underzooming" range. Here's an example of a satellite layer with higher-zoom (cloudy) tiles persistently drawn where we should have lower zoom tiles:
At Felt, we're working around this by using
raster-fade-duration: 1
which isn't visibly different but avoids the logic error.I believe the correct logic should be:
a.k.a. "don't hold for fading, if (1) the tile is already out of the pyramid, (2) the tile doesn't have a fade duration set, or (3) the tile has a fade duration set, but it's expired"
cc @ibesora
The text was updated successfully, but these errors were encountered: