mapbox / mapbox/mapbox-gl-draw

Pass userProperties to midpoints and vertices

Open
#846 9 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api feature has PR
Dominant language
JavaScript
Stars
1.1k
Forks
612
Avg merge
8d 9h
Merged PRs (30d)
5

Description

On creation of a midpoint or a vertex, the new feature is initialized with a reference to the parent feature but none of the properties are passed down. This means that midpoints and vertices can't be styled based on user-provided properties. I'd like to work up a PR where the user-provided properties are passed down to these features for potential styling. Thoughts?

Parent references:

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

Start with src/lib/create_vertex.js and src/lib/create_midpoint.js at the linked lines, then trace how parent feature properties are represented and consumed for styling. Verify the creation paths for both feature types and confirm that user-provided properties are available on the resulting midpoint and vertex features.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.