Class LayerManager

Source
Expand description

Manages the layers of the map.

This class provides methods to add, remove, and search for layers, as well as to manage the bounding box of the map.

Constructors§

Source§

new LayerManager(): LayerManager

Constructor for LayerManager

Properties§

Source§

protected _bbox: BBox

Bounding box of the map.

Source§

protected _origin: number[]

Origin of the map.

Source§

protected _rasterLayers: RasterLayer[] = []

List of raster layers in the map.

Source§

protected _vectorLayers: VectorLayer[] = []

List of vector layers in the map.

Accessors§

Source§

get bboxAndOrigin(): BBox

Get the bounding box of the map.

Source§

set bboxAndOrigin(bbox: BBox): void

Set the origin and the bounding box of the map.

Source§

get origin(): number[]

Get the origin of the map.

Source§

get rasterLayers(): RasterLayer[]

Get the raster layers of the map.

Source§

get vectorLayers(): VectorLayer[]

Get the vetor layers of the map.

Methods§

Source§

addRasterLayer(
    layerInfo: ILayerInfo,
    layerRender: ILayerRenderInfo,
    layerData: ILayerData,
): RasterLayer | null

Adds a raster layer to the map.

Source§

addVectorLayer(
    layerInfo: ILayerInfo,
    layerRender: ILayerRenderInfo,
    layerData: ILayerData,
): VectorLayer | null

Adds a layer to the map.

Source§

computeZindex(layerType: LayerType): number

Computes the Z-index for a given layer type.

Source§

delLayer(layerId: string): void

Removes a layer from the map.

Source§

searchByLayerId(layerId: string): VectorLayer | RasterLayer | null

Searches for a layer by its ID.