mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

Cannot use feature-state with icon-image-cross-fade paint property

Open helena-dev opened this issue 4 months ago • 0 comments

mapbox-gl-js version: 3.1.2

browser: chrome

Steps to Trigger Behavior

  1. Create a symbol layer with two icon-image variants which uses icon-image-cross-fade to control the image shown
  2. Set the feature-state of an element so that the second image variant should be used
  3. 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.

helena-dev avatar Feb 27 '24 10:02 helena-dev