geospatial-sdk / core/lib / addLayerToContext
addLayerToContext()
ts
function 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
• 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.