Skip to content

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

MapContext

  • The new map context with the replaced layer.

Defined in

packages/core/lib/utils/map-context.ts:90