"raster-fade-duration" is not respected
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
[Per the style spec, raster layers may specify a `raster-fade-duration`](https://www.mapbox.com/mapbox-gl-style-spec/#paint-raster-fade-duration).
GL JS [ignores this value in some places](https://github.com/mapbox/mapbox-gl-js/blob/master/js/style/style.js#L237), instead using a hardcoded value of 300ms, and [respects it in others](http://github.com/mapbox/mapbox-gl-js/blob/master/js/render/draw_raster.js#L108-L109), leaving some images marooned below their intended opacity.
**mapbox-gl-js version**: v0.26.0
### Steps to Trigger Behavior
view http://jsbin.com/mowadacuju/1/edit?html,output
### Expected Behavior
The map's animation loop runs for the duration of the layer's `raster-fade-duration`, allowing the image to reach its desired opacity.

### Actual Behavior
The map's animation loop runs only for 300ms, leaving the image at an opacity below its desired opacity.
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 JSBin reproduction, then compare the raster-fade-duration handling in js/style/style.js around line 237 with js/render/draw_raster.js around lines 108-109. Trace how the animation loop is scheduled and verify that it continues for the layer's configured duration, allowing the raster image to reach its intended opacity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100