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 #12240

Closed
stepankuzmin opened this issue Sep 16, 2022 · 2 comments
Closed
Labels

Comments

@stepankuzmin
Copy link
Contributor

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;

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

@mourner
Copy link
Member

mourner commented Sep 16, 2022

Looks like this issue was accidentally duplicated. Closing this one as duplicate of #12241

@mourner mourner closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2022
@stepankuzmin
Copy link
Contributor Author

Whoops, seems like some internet issue on my end. thanks, Vlad!

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

No branches or pull requests

2 participants