Set feature initial state when creating FeatureCollection
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**:
### Question
I have a bunch of points in FeatureCollection. For every point, I have a state: {status: Deleted / Selected / None}. I render the color of point using the state from feature.
When I retrieve data of points from the backend, I need to restore previously edited status for each single point. So can I create FeatureCollection with initial feature state for each point?
### Links to related documentation
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
No files, tests, or entry points are named. Start by tracing FeatureCollection creation and feature-state handling in mapbox-gl-js; done means determining whether each feature can receive its initial Deleted, Selected, or None state when backend data is restored.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100