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

Raster tiles are always retained when raster-fade-duration is set to 0 #12241

Open
stepankuzmin opened this issue Sep 16, 2022 · 0 comments · May be fixed by #12684
Open

Raster tiles are always retained when raster-fade-duration is set to 0 #12241

stepankuzmin opened this issue Sep 16, 2022 · 0 comments · May be fixed by #12684
Labels

Comments

@stepankuzmin
Copy link
Contributor

stepankuzmin commented Sep 16, 2022

GL JS always retains raster tiles if raster-fade-duration is set to 0.

Screen Shot 2022-09-16 at 13 30 47

It's most likely related to how we handle fading tiles in SourceCache.

if (!tile || (tile.fadeEndTime && tile.fadeEndTime <= browser.now())) continue;
// if the tile is loaded but still fading in, find parents to cross-fade with it
const parentTile = this.findLoadedParent(tileID, Math.max(tileID.overscaledZ - SourceCache.maxOverzooming, this._source.minzoom));
if (parentTile) {
this._addTile(parentTile.tileID);
parentsForFading[parentTile.tileID.key] = parentTile.tileID;
}
fadingTiles[id] = tileID;

Also related to #4034

Steps to Trigger Behavior

  1. Add raster source
  2. Set raster-fade-duration to 0
  3. Zoom out and see that children tiles are still retained

Link to Demonstration

https://codepen.io/stepankuzmin/pen/zYjNQWM

Expected Behavior

Parent tiles should replace children tiles

Actual Behavior

Children tiles are retained, parent tiles aren't drawn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant