Skip to content

replaceLayerInContext() ​

replaceLayerInContext(context, layerModel, replacement): MapContext

Replaces a layer in the context with a new layer.

Parameters ​

ParameterTypeDescription
contextMapContextThe current map context.
layerModelMapContextLayerThe layer to be replaced.
replacementMapContextLayerThe new layer that will replace the old one.

Returns ​

MapContext

The new map context with the replaced layer.