Activates the base layer with the given id.
undefined
can be used to hide all base layers.
The associated layer is made visible and all other base layers are hidden.
Returns true if the given layer has been successfully activated.
Adds a new layer to the map.
The new layer is automatically registered with this collection.
NOTE: by default, the new layer will be shown on top of all existing layers.
Use the options
parameter to control the insertion point.
Optional
options: AddLayerOptionsReturns the currently active base layer.
Returns a list of layers known to this collection. This includes base layers and operational layers. The returned list includes top level layers only. Use () to retrieve (nested) child layers.
Optional
options: LayerRetrievalOptionsReturns all configured base layers.
Returns the items in this collection.
Optional
options: LayerRetrievalOptionsReturns the layer identified by the id
or undefined, if no such layer exists.
Returns a list of layers known to this collection. This includes base layers and operational layers. The returned list includes top level layers only. Use () to retrieve (nested) child layers.
Optional
options: LayerRetrievalOptionsReturns a list of operational layers, starting from the root of the map's layer hierarchy. The returned list includes top level layers only. Use () to retrieve (nested) child layers.
Optional
options: LayerRetrievalOptionsReturns a list of all layers in this collection, including all children (recursively).
Note: This includes base layers by default (see
options.filter
). Use the"base"
or"operational"
short hand values to filter by base layer or operational layers.If the layer hierachy is deeply nested, this function could potentially be expensive.
Optional
options: Omit<RecursiveRetrievalOptions, "filter"> & {Removes a layer identified by the id
from the map.
NOTE: The current implementation only supports removal of top level layers.
Contains the layers known to a MapModel.