Cannot use feature-state with icon-image-cross-fade paint property
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
**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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox reproduction and the reported mapbox-gl-js version, focusing on the symbol layer's icon-image-cross-fade paint property and feature-state interaction. Confirm whether changing feature-state can select the second icon variant on an individual element; done means the reproduction shows the expected variant while other supported controls continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100