LayerToolState
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
Overrides
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
Overrides
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
Implementation of
Source
model/internal/layer/LayerToolState.ts:120
getIcon()
getIcon():
string
It returns the icon property of the tool state.
Returns
string
Implementation of
Inherited from
Source
model/internal/tool/MapToolState.ts:120
getId()
getId():
string
It returns the id property of the tool state.
Returns
string
Implementation of
Inherited from
Source
model/internal/object/MapObjectState.ts:87
getLabel()
getLabel():
string
It returns the label property of the tool state.
Returns
string
Implementation of
Inherited from
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
Source
model/internal/layer/LayerToolState.ts:104
getLayerName()
getLayerName():
string
It returns the layer name property of the tool state.
Returns
string
Implementation of
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
Inherited from
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
Source
model/internal/object/MapObjectState.ts:39
getType()
getType():
string
It returns the type property of the tool state.
Returns
string
Implementation of
Inherited from
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
Overrides
Source
model/internal/layer/LayerToolState.ts:35
isEnabled()
isEnabled():
boolean
It returns the enabled property of the tool state.
Returns
boolean
Implementation of
Inherited from
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
Implementation of
Overrides
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
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
Inherited from
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
Inherited from
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
Inherited from
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
Inherited from
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
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
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