We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
mapbox-gl-js version: 0.42.1 & 0.42.2
map.setPaintProperty()
When modifying stops and calling map.setPaintProperty() the layer should redraw with the correct stops colors
When modifying stops and calling map.setPaintProperty() the layer redraws only once or not at all
Fiddles: 0.42.0 - WORKS https://jsfiddle.net/bmdqb0nv
0.42.1 - BROKEN https://jsfiddle.net/9qj1szd6
0.42.2 - BROKEN https://jsfiddle.net/a7qo64s2
call map.setPaintProperty(<layer name>, 'fill-color'); before using the new stops.
map.setPaintProperty(<layer name>, 'fill-color');
The text was updated successfully, but these errors were encountered:
thanks for the thorough report @justinhurlburt. this bisects to 7e87d7c
Sorry, something went wrong.
this line 7e87d7c#diff-0fcf9ef37a1614185cad0dcbd5ec5529L775 is always returning true in the current code, so _updateLayer is never called. it seems the style is already updated before layer.setPaintProperty is called 💭 cc @jfirebaugh
_updateLayer
layer.setPaintProperty
As a workaround, avoid updating fillColor.stops in place -- generate a fresh array for each setPaintProperty call.
fillColor.stops
setPaintProperty
jfirebaugh
No branches or pull requests
mapbox-gl-js version:
0.42.1 & 0.42.2
Steps to Trigger Behavior
map.setPaintProperty()
with the new stopsExpected Behavior
When modifying stops and calling
map.setPaintProperty()
the layer should redraw with the correct stops colorsActual Behavior
When modifying stops and calling
map.setPaintProperty()
the layer redraws only once or not at allFiddles:
0.42.0 - WORKS
https://jsfiddle.net/bmdqb0nv
0.42.1 - BROKEN
https://jsfiddle.net/9qj1szd6
0.42.2 - BROKEN
https://jsfiddle.net/a7qo64s2
Workaround
call
map.setPaintProperty(<layer name>, 'fill-color');
before using the new stops.The text was updated successfully, but these errors were encountered: