You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the "county-extruded" layer is not visible initially by setting fill-extrusion-opacity: 0, the map displays as expected. The three counties matched in the getColor() function are correctly filled red, green, and blue. The unmatched counties are colored with 'rgba(204, 204, 204, 0)'. Because the rgba alpha opacity is set to 0 on the unmatched counties, they correctly do not fill. The lightblue background color on #map-container shows through as expected.
.
When the 'Show extruded layer' button is clicked and the county-extruded layer is shown by setting fill-extrusion-opacity to 1, the "other" counties don't seem to follow the 0 opacity for fill-extrusion-color. They appear colored in black.
I am experimenting with dynamically styling a vector layer. Setting color of a fill type layer looked promising, but when I extended the idea to a fill-extrusion layer, I ran into this issue.
Expected Behavior
fill-extrusion-color should follow the alpha channel as fill-color does.
Actual Behavior
fill-extrusion-color fills black if the alpha channel is 0
The text was updated successfully, but these errors were encountered:
If this color is specified as `rgba` with an alpha component, the alpha component will be ignored**; use `fill-extrusion-opacity` to set layer opacity.
This would explain why the extruded "other" layers are not following the alpha component. But, I would expect "other" counties in this layer to be colored light gray (204, 204. 204, ignored/1?) instead of black.
I see that if I explicitly set the alpha to 'rgba(204, 204, 204, 1)', the "other" extruded counties are shown as solid light gray, seeming to follow the alpha value.
fill-extrusion-opacity cannot be driven by data, I believe.
mapbox-gl-js version:
v1.12.0
browser:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
https://www.whatsmybrowser.org/b/QZK8A
Steps to Trigger Behavior
Example that shows behavior:
.
.
This may be related. mapbox/mapbox-gl-style-spec#556
I am experimenting with dynamically styling a vector layer. Setting color of a fill type layer looked promising, but when I extended the idea to a fill-extrusion layer, I ran into this issue.
Expected Behavior
fill-extrusion-color should follow the alpha channel as fill-color does.
Actual Behavior
fill-extrusion-color fills black if the alpha channel is 0
The text was updated successfully, but these errors were encountered: