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-fade-duration" is not respected #3526

Open
lucaswoj opened this issue Nov 3, 2016 · 7 comments
Open

"raster-fade-duration" is not respected #3526

lucaswoj opened this issue Nov 3, 2016 · 7 comments

Comments

@lucaswoj
Copy link
Contributor

lucaswoj commented Nov 3, 2016

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

@jfirebaugh
Copy link
Contributor

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.

@mourner
Copy link
Member

mourner commented Nov 3, 2016

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

@bplmp
Copy link

bplmp commented Jun 23, 2018

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.

@sdfricke
Copy link

sdfricke commented Feb 20, 2019

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.

@sdfricke
Copy link

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

@CharlesTaylor-FW
Copy link

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

@blq
Copy link

blq commented Nov 15, 2022

For me fading out 1->0 works with a duration. But fading in 0->1 jumps immediately for raster layer.
MapboxGL version: 1.13.2

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

No branches or pull requests

7 participants