Skip to main content

LayerToolState

geovisto-map • Readme | API


geovisto-map / LayerToolState

Class: LayerToolState

This class provide functions for using the state of the layer tool.

Author​

Jiri Hynek

Extends​

Implements​

Constructors​

new LayerToolState()​

new LayerToolState(tool): LayerToolState

It creates a tool state.

Parameters​

• tool: ILayerTool\<ILayerToolProps, ILayerToolDefaults, ILayerToolState\<ILayerToolProps, ILayerToolDefaults, ILayerToolConfig, ILayerToolDimensionsConfig, ILayerToolDimensions>, ILayerToolConfig, IMapToolInitProps\<ILayerToolConfig>>

Returns​

LayerToolState

Overrides​

MapToolState.constructor

Source​

model/internal/layer/LayerToolState.ts:24

Properties​

dimensions​

private dimensions: ILayerToolDimensions

Source​

model/internal/layer/LayerToolState.ts:18


layerItems?​

private optional layerItems: Layer[]

Source​

model/internal/layer/LayerToolState.ts:19


layerName​

private layerName: string

Source​

model/internal/layer/LayerToolState.ts:17

Methods​

deserialize()​

deserialize(config): void

The metod takes config and deserializes the values.

Parameters​

• config: ILayerToolConfig

Returns​

void

Implementation of​

ILayerToolState.deserialize

Overrides​

MapToolState.deserialize

Source​

model/internal/layer/LayerToolState.ts:49


deserializeDimensions()​

deserializeDimensions(dimensionsConfig): void

It sets the marker layer dimensions property of tool state.

Parameters​

• dimensionsConfig: ILayerToolDimensionsConfig

Returns​

void

Implementation of​

ILayerToolState.deserializeDimensions

Source​

model/internal/layer/LayerToolState.ts:67


getDimensions()​

getDimensions(): ILayerToolDimensions

It returns the map layer dimensions property of the tool state.

Returns​

ILayerToolDimensions

Implementation of​

ILayerToolState.getDimensions

Source​

model/internal/layer/LayerToolState.ts:120


getIcon()​

getIcon(): string

It returns the icon property of the tool state.

Returns​

string

Implementation of​

ILayerToolState.getIcon

Inherited from​

MapToolState.getIcon

Source​

model/internal/tool/MapToolState.ts:120


getId()​

getId(): string

It returns the id property of the tool state.

Returns​

string

Implementation of​

ILayerToolState.getId

Inherited from​

MapToolState.getId

Source​

model/internal/object/MapObjectState.ts:87


getLabel()​

getLabel(): string

It returns the label property of the tool state.

Returns​

string

Implementation of​

ILayerToolState.getLabel

Inherited from​

MapToolState.getLabel

Source​

model/internal/tool/MapToolState.ts:104


getLayerItems()​

getLayerItems(): undefined | Layer[]

It returns the layer items property of the tool state.

Returns​

undefined | Layer[]

Implementation of​

ILayerToolState.getLayerItems

Source​

model/internal/layer/LayerToolState.ts:104


getLayerName()​

getLayerName(): string

It returns the layer name property of the tool state.

Returns​

string

Implementation of​

ILayerToolState.getLayerName

Source​

model/internal/layer/LayerToolState.ts:88


getMap()​

getMap(): IMap\<IMapProps, IMapDefaults, IMapState\<IMapProps, IMapDefaults, IMapConfig>, IMapConfig, IMapInitProps\<IMapConfig>>

It returns the map property of the tool state.

Returns​

IMap\<IMapProps, IMapDefaults, IMapState\<IMapProps, IMapDefaults, IMapConfig>, IMapConfig, IMapInitProps\<IMapConfig>>

Implementation of​

ILayerToolState.getMap

Inherited from​

MapToolState.getMap

Source​

model/internal/tool/MapToolState.ts:136


getMapObject()​

protected getMapObject(): IMapObject\<IMapObjectProps, IMapObjectDefaults\<IMapObjectProps, IMapObjectConfig>, IMapObjectState\<IMapObjectProps, IMapObjectDefaults\<IMapObjectProps, IMapObjectConfig>, IMapObjectConfig, IMapObjectInitProps\<IMapObjectConfig>>, IMapObjectConfig, IMapObjectInitProps\<IMapObjectConfig>>

It makes the map object visible to extended classes.

Returns​

IMapObject\<IMapObjectProps, IMapObjectDefaults\<IMapObjectProps, IMapObjectConfig>, IMapObjectState\<IMapObjectProps, IMapObjectDefaults\<IMapObjectProps, IMapObjectConfig>, IMapObjectConfig, IMapObjectInitProps\<IMapObjectConfig>>, IMapObjectConfig, IMapObjectInitProps\<IMapObjectConfig>>

Inherited from​

MapToolState.getMapObject

Source​

model/internal/object/MapObjectState.ts:39


getType()​

getType(): string

It returns the type property of the tool state.

Returns​

string

Implementation of​

ILayerToolState.getType

Inherited from​

MapToolState.getType

Source​

model/internal/object/MapObjectState.ts:80


initialize()​

initialize(defaults, props, initProps): void

It resets the state with respect to the initial props.

Parameters​

• defaults: ILayerToolDefaults

• props: ILayerToolProps

• initProps: IMapToolInitProps

Returns​

void

Implementation of​

ILayerToolState.initialize

Overrides​

MapToolState.initialize

Source​

model/internal/layer/LayerToolState.ts:35


isEnabled()​

isEnabled(): boolean

It returns the enabled property of the tool state.

Returns​

boolean

Implementation of​

ILayerToolState.isEnabled

Inherited from​

MapToolState.isEnabled

Source​

model/internal/tool/MapToolState.ts:88


serialize()​

serialize(defaults): ILayerToolConfig

The method serializes the tool state. Optionally, defaults can be set if property is undefined.

Parameters​

• defaults: undefined | ILayerToolDefaults

Returns​

ILayerToolConfig

Implementation of​

ILayerToolState.serialize

Overrides​

MapToolState.serialize

Source​

model/internal/layer/LayerToolState.ts:76


setDimensions()​

setDimensions(dimensions): void

It sets the map layer dimensions property of tool state.

Parameters​

• dimensions: ILayerToolDimensions

Returns​

void

Implementation of​

ILayerToolState.setDimensions

Source​

model/internal/layer/LayerToolState.ts:129


setEnabled()​

setEnabled(enabled): void

It sets the enabled property of tool state.

Parameters​

• enabled: boolean

Returns​

void

Implementation of​

ILayerToolState.setEnabled

Inherited from​

MapToolState.setEnabled

Source​

model/internal/tool/MapToolState.ts:97


setIcon()​

setIcon(icon): void

It sets the icon property of the tool state.

Parameters​

• icon: string

Returns​

void

Implementation of​

ILayerToolState.setIcon

Inherited from​

MapToolState.setIcon

Source​

model/internal/tool/MapToolState.ts:129


setId()​

setId(id): void

It sets the id property of the tool state.

Parameters​

• id: string

Returns​

void

Implementation of​

ILayerToolState.setId

Inherited from​

MapToolState.setId

Source​

model/internal/object/MapObjectState.ts:96


setLabel()​

setLabel(label): void

It sets the label property of the tool state.

Parameters​

• label: string

Returns​

void

Implementation of​

ILayerToolState.setLabel

Inherited from​

MapToolState.setLabel

Source​

model/internal/tool/MapToolState.ts:113


setLayerItems()​

setLayerItems(layerItems): void

It sets the layer items property of tool state.

Parameters​

• layerItems: Layer[]

Returns​

void

Implementation of​

ILayerToolState.setLayerItems

Source​

model/internal/layer/LayerToolState.ts:113


setLayerName()​

setLayerName(layerName): void

It sets the layer name property of the tool state.

Parameters​

• layerName: string

Returns​

void

Implementation of​

ILayerToolState.setLayerName

Source​

model/internal/layer/LayerToolState.ts:97


setMap()​

protected setMap(map): void

It sets the map property of the tool state.

Parameters​

• map: IMap\<IMapProps, IMapDefaults, IMapState\<IMapProps, IMapDefaults, IMapConfig>, IMapConfig, IMapInitProps\<IMapConfig>>

Returns​

void

Inherited from​

MapToolState.setMap

Source​

model/internal/tool/MapToolState.ts:145