Mapbox-gl-js: "raster-fade-duration" is not respected

Created on 3 Nov 2016  路  6Comments  路  Source: mapbox/mapbox-gl-js

Per the style spec, raster layers may specify a raster-fade-duration.

GL JS ignores this value in some places, instead using a hardcoded value of 300ms, and respects it in others, 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.

screen shot 2016-11-02 at 6 28 37 pm

Actual Behavior

The map's animation loop runs only for 300ms, leaving the image at an opacity below its desired opacity.

screen shot 2016-11-02 at 6 28 33 pm

bug needs discussion

All 6 comments

I would like to just remove this property and either hard-code a default, use the style global transition duration, or have a separate style-global value like transition or light.

@jfirebaugh I would love to do this too, combined with removing individual transition properties altogether (in favor of a global style transition).

Same issue for me. When I set the layer opacity with map.setPaintProperty('mapbox-satellite', 'raster-opacity', 0) it fades out at 300ms, no matter what's the value of raster-fade-duration set at.

Using mapbox-gl-js/v0.45.0.

I am having this issue as well. When I set raster-fade-duration to zero on my raster layer, it still appears to have a transition which I change the opacity.

I created a codepen example which demonstrates the issue https://codepen.io/anon/pen/MLMxBW

+1. I am experiencing this issue. Any status update?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aderaaij picture aderaaij  路  3Comments

samanpwbb picture samanpwbb  路  3Comments

Scarysize picture Scarysize  路  3Comments

mollymerp picture mollymerp  路  3Comments

PBrockmann picture PBrockmann  路  3Comments