updateLayerInContext() ​
updateLayerInContext(
context,layerModel,layerUpdates):MapContext
Updates an existing layer in the context by applying partial changes.
Note: setting a property to undefined in the partial layer updates will remove that property from the existing layer.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
context | MapContext | The current map context. |
layerModel | MapContextLayer | The layer to be updated. |
layerUpdates | Partial<MapContextLayer> | A partial layer object containing the properties to update on the existing layer. |
Returns ​
The new map context with the updated layer.