tiled icon indicating copy to clipboard operation
tiled copied to clipboard

Scripting: batch add/remove layers

Open user72356 opened this issue 2 years ago • 0 comments

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.

user72356 avatar Apr 09 '22 00:04 user72356