/mapview/removeLayer
The module exports the removeLayer method which is bound to the mapview.
- Source
Methods
(inner) removeLayer(layers) → {array}
A single layer key/object or an array of layer keys/objects can be removed from the mapview with the removeLayer method. The layer will be hidden from the map if currently displayed. The layer will be removed from the mapview.layers{} object. The layer's OpenLayers instance will be disposed properly to prevent memory leaks.
Parameters:
Name | Type | Description |
---|---|---|
layers | string | | A single layer key/object or an array of layer keys/objects to be removed from the mapview. |
- Source
Returns:
The array of removed layer keys is returned.
- Type:
- array