ol-mapbox-style icon indicating copy to clipboard operation
ol-mapbox-style copied to clipboard

Remove Style (undo apply)

Open olsp opened this issue 2 years ago • 1 comments

Is there a way to "remove" styles? The opposite of "apply" so to say. I would like to switch different styles via JS and therefore not only need to apply certain styles but also remove them.

olsp avatar Sep 28 '22 19:09 olsp

When you use apply(layerGroup, ...), you can delete the whole layer group and then apply a different style to a new layer group.

ahocevar avatar Sep 28 '22 20:09 ahocevar