addLayerToContext() ​
addLayerToContext(
context,layerModel,position?):MapContext
Adds a layer to the context at a specific position or at the end if no position is specified.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
context | MapContext | The current map context. |
layerModel | MapContextLayer | The layer to be added. |
position? | number | The position at which to add the layer. If not specified, the layer is added at the end. |
Returns ​
The new map context with the added layer.