Support feature-state in layer filters
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
## Motivation
We use `feature-state` for client side data joins. We would like to do some dynamic filtering of the data based on feature-state.
## Design Alternatives
We could as a work around set the opacity of these features to 0 conditionally. It does seem a bit hacky though.
## Design
I'm not sure about the technicalities, but it seems that feature-state could just be allowed in filter expressions.
### Concepts
I don't think there are any new concepts here, just broadening existing features to work together.
### Implementation
No idea.
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 by locating the existing filter-expression handling and feature-state support in mapbox-gl-js, since the issue names no files or tests. Define how feature-state should participate in layer filters, then add coverage showing dynamic filtering works and preserves current filter behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100