geospatial-sdk / core/lib / replaceLayerInContext
replaceLayerInContext()
ts
function replaceLayerInContext(
context,
layerModel,
replacement): MapContext
Replaces a layer in the context with a new layer.
Parameters
• context: MapContext
The current map context.
• layerModel: MapContextLayer
The layer to be replaced.
• replacement: MapContextLayer
The new layer that will replace the old one.
Returns
- The new map context with the replaced layer.