Scripting: batch add/remove layers
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 12.9k
- Forks
- 2k
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 8
Description
**Is your feature request related to a problem? Please describe.**
I maintain a script that frequently adds/removes all layers on a map. At this time I have to call addLayer() and removeLayer() for each individual layer. For large maps this can be noticeably slow.
**Describe the solution you'd like**
I would like an addLayers(layers: Layer[]) function that takes an array of Layer[] to be added to the map.
I would also like a removeLayers() function that removes all layers, and a removeLayersAt(from: number, to: number) function that removes the layers between the provided indices.
**Describe alternatives you've considered**
No alternatives possible.
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 scripting entry points for addLayer() and removeLayer(). Review how individual layer operations are exposed, then determine the expected behavior for addLayers(layers), removeLayers(), and removeLayersAt(from, to), including index boundaries. Done means all three batch operations are available through scripting and match the requested layer behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100