mapbox / mapbox/mapbox-gl-js

Set feature initial state when creating FeatureCollection

Open
#13,095 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged feature :green_apple:
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.