replaceLayerInContext() ​
replaceLayerInContext(
context,layerModel,replacement):MapContext
Replaces a layer in the context with a new layer.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
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.