mapbox / mapbox/mapbox-gl-js

Some tiles cannot be deleted when zooming in or out

Open
#10,892 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug :lady_beetle: needs investigation :mag:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

**mapbox-gl-js version**: 2.3.1

**browser**: Google Chrome(92.0.4515.107)

### Steps to Trigger Behavior
Hello, I found a problem when using Mapbox-GL-JS. I have been searching for a long time but I don't know what caused the problem. The problem is described as follows(This is always a problem when raster-fader-duration = 0, and occasionally when it is not set):
1.Use the Raster Source to add tiles to the map
2.Zoom out and then zoom in
3.At this point, you can see that the tiles of the previous level are not deleted

### Link to Demonstration

`
'label-tile-source': {
"type": "raster",
'tiles': [
'http://t0.tianditu.com/DataServer?T=cva_w&X={x}&Y={y}&L={z}&tk=b055e3a80de633c788f673dfcb164aa4'
],
'tileSize': 256
}
`

`
{
"id": "label-tile-layer",
"type": "raster",
"source": "label-tile-source",
"minzoom": 0,
"maxzoom": 12,
"layout": {},
"paint": {
'raster-fade-duration': 0
}
}
`

![QQ截图20210723151027](https://user-images.githubusercontent.com/17270753/126750166-f8a7a2e1-8b33-4355-aa12-3f17c85822e5.png)

### Expected Behavior
It is expected that all tiles will be the same size when the map is scaled
### Actual Behavior
But now the labels that were not deleted are smaller because the previous layer of tiles was not deleted

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are named. Reproduce the issue in mapbox-gl-js 2.3.1 with a raster source, zoom out and back in, and compare behavior with raster-fade-duration set to 0 and when it is omitted. Done means tiles from the previous zoom level are removed and the raster labels remain correctly sized.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.