mapbox / mapbox/mapbox-gl-draw
Add box-selection mode for selecting multiple vertices at once
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 612
- Avg merge
- 8d 9h
- Merged PRs (30d)
- 5
Description
**mapbox-gl-js version**: newest
**mapbox-gl-draw version**: newest
### Steps to Trigger Behavior
-
### Expected Behavior
I would like to select verticles programatically.
Currently I can't see the possibility of selecting only a couple of verticles of a polygon.
I'd like to add a function when I hold a key + click + drag draw a bounding box which selects the verticles of the selected feature within the bounding box.
Draw a bbox and select features example:
https://docs.mapbox.com/mapbox-gl-js/example/using-box-queryrenderedfeatures/
I want the same but selecting the vertex of the currently selected feature instead the whole feature's each vertex.
### Actual Behavior
Currently, If I want to select multiple vertexes I have to zoom in, hold the shift key and click vertexes one-by-one which is very slow and frustrating, especially when I'm working with a bigger geojson file (5MB).
Why I need it? Sometimes there are many unneccessary points within a polygon that I want to remove.
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 implementation files or tests are named. Start by reviewing the existing vertex-selection interaction and the linked Mapbox box-query-rendered-features example; done means a key-plus-drag bounding box selects only vertices within the currently selected feature.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100