/mapview/removeLayer

The module exports the removeLayer method which is bound to the mapview.

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:
NameTypeDescription
layersstring | object | array

A single layer key/object or an array of layer keys/objects to be removed from the mapview.

Returns:

The array of removed layer keys is returned.

Type: 
array