CustomSource tiles transition/fade duration issue
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
**mapbox-gl-js version**:
affected since 2.11, 2.12, 2.13 (2.10 doesn't have this behavior)
**browser**:
Chrome, FF, Android Chrome,
### Steps to Trigger Behavior
````ts
const customSource = {
type: 'custom',
dataType: 'raster',
id: 'customSource',
loadTile: async () => new ImageData(1, 1),
};
map.addSource(customSource.id, customSource);
map.addLayer({ id: 'rasterLayer', type: 'raster', source: customSource.id, paint: { 'raster-fade-duration': 0 } });
````
1. Create minimal Custom Source Demo
2. Add basic **rasterLayer** with prepared custom Source with `paint: { 'raster-fade-duration': 0 } `. Any small values of `'raster-fade-duration'` cause the unwanted effect. In my experiments values > 100 worked as expected.
3. Zoom in and out. Tiles from deeper levels remain.
4. Very big values `paint: { 'raster-fade-duration': 5000 } ` give similar effect, but in this case map panning removes unwanted tiles.
### Link to Demonstration
https://metoceanapi.github.io/wxtiles-mbox/bug4.html
### Expected Behavior
No tiles from deeper levels remain with `paint: { 'raster-fade-duration': 0 } `
As in MapBox v2.10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked reproduction at metoceanapi.github.io/wxtiles-mbox/bug4.html and the custom-source example using map.addSource, map.addLayer, and raster-fade-duration. Reproduce the issue by zooming in and out with a fade duration of 0, then compare the behavior with Mapbox GL JS 2.10. Done means deeper-level tiles no longer remain after zooming.
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