mapbox-gl-js
mapbox-gl-js copied to clipboard
Cannot use feature-state with icon-image-cross-fade paint property
mapbox-gl-js version: 3.1.2
browser: chrome
Steps to Trigger Behavior
- Create a symbol layer with two icon-image variants which uses icon-image-cross-fade to control the image shown
- Set the feature-state of an element so that the second image variant should be used
- See that the image shown is still the default (1st).
Link to Demonstration
https://codesandbox.io/p/sandbox/icon-image-cross-fade-w2rjl7
Expected Behavior
One can use feature-state to control the icon-image-cross-fade paint property
Actual Behavior
Feature-state does not allow to manipulate icon-image-cross-fade on an element by element basis. Other properties, such as zoom, do work as expected.