Skip to main content

AbstractLayerTool

geovisto-mapReadme | API


geovisto-map / AbstractLayerTool

Class: abstract AbstractLayerTool

This class wraps filter tool. It provides methods for layer management.

Author

Jiri Hynek

Extends

Implements

Constructors

new AbstractLayerTool()

new AbstractLayerTool(props?): AbstractLayerTool

It creates a new tool with respect to the props.

Parameters

props?: ILayerToolProps

Returns

AbstractLayerTool

Overrides

MapTool.constructor

Source

model/internal/layer/AbstractLayerTool.ts:29

Methods

copy()

abstract copy(): ILayerTool\<ILayerToolProps, ILayerToolDefaults, ILayerToolState\<ILayerToolProps, ILayerToolDefaults, ILayerToolConfig, ILayerToolDimensionsConfig, ILayerToolDimensions>, ILayerToolConfig, IMapToolInitProps\<ILayerToolConfig>>

It creates a copy of the uninitialized layer tool.

Returns

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

Implementation of

ILayerTool.copy

Overrides

MapTool.copy

Source

model/internal/layer/AbstractLayerTool.ts:36


create()

create(): this

It creates new layer with respect to configuration

Returns

this

Implementation of

ILayerTool.create

Overrides

MapTool.create

Source

model/internal/layer/AbstractLayerTool.ts:89


createDefaults()

protected createDefaults(): ILayerToolDefaults

It creates new defaults of the layer tool.

Returns

ILayerToolDefaults

Overrides

MapTool.createDefaults

Source

model/internal/layer/AbstractLayerTool.ts:55


createLayerItems()

protected abstract createLayerItems(): Layer[]

It creates layer items.

Override this function.

Returns

Layer[]

Source

model/internal/layer/AbstractLayerTool.ts:179


createState()

protected createState(): ILayerToolState\<ILayerToolProps, ILayerToolDefaults, ILayerToolConfig, ILayerToolDimensionsConfig, ILayerToolDimensions>

It creates new defaults of the layer tool.

Returns

ILayerToolState\<ILayerToolProps, ILayerToolDefaults, ILayerToolConfig, ILayerToolDimensionsConfig, ILayerToolDimensions>

Overrides

MapTool.createState

Source

model/internal/layer/AbstractLayerTool.ts:69


getAPIGetter()

getAPIGetter(): undefined | IMapToolAPIGetter

It returns the tool API

Returns

undefined | IMapToolAPIGetter

Implementation of

ILayerTool.getAPIGetter

Inherited from

MapTool.getAPIGetter

Source

model/internal/tool/MapTool.ts:74


getDefaults()

getDefaults(): ILayerToolDefaults

It returns default values of the state properties.

Returns

ILayerToolDefaults

Implementation of

ILayerTool.getDefaults

Overrides

MapTool.getDefaults

Source

model/internal/layer/AbstractLayerTool.ts:48


getId()

getId(): string

Help function which returns the id of the object.

Returns

string

Implementation of

ILayerTool.getId

Inherited from

MapTool.getId

Source

model/internal/object/MapObject.ts:93


getLayerItems()

getLayerItems(): Layer[]

It returns layer items which should be rendered.

Returns

Layer[]

Implementation of

ILayerTool.getLayerItems

Source

model/internal/layer/AbstractLayerTool.ts:163


getMap()

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

Help function returns map which uses this tool.

Do not override this function. Use the state class instead.

Returns

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

Implementation of

ILayerTool.getMap

Inherited from

MapTool.getMap

Source

model/internal/tool/MapTool.ts:112


getProps()

getProps(): ILayerToolProps

Help function which returns the props given by the programmer.

Returns

ILayerToolProps

Implementation of

ILayerTool.getProps

Overrides

MapTool.getProps

Source

model/internal/layer/AbstractLayerTool.ts:41


getState()

getState(): ILayerToolState\<ILayerToolProps, ILayerToolDefaults, ILayerToolConfig, ILayerToolDimensionsConfig, ILayerToolDimensions>

It returns the layer tool state.

Returns

ILayerToolState\<ILayerToolProps, ILayerToolDefaults, ILayerToolConfig, ILayerToolDimensionsConfig, ILayerToolDimensions>

Implementation of

ILayerTool.getState

Overrides

MapTool.getState

Source

model/internal/layer/AbstractLayerTool.ts:62


getType()

getType(): string

Help function which returns the type of the object.

Returns

string

Implementation of

ILayerTool.getType

Inherited from

MapTool.getType

Source

model/internal/object/MapObject.ts:86


handleEvent()

handleEvent(event): void

This function is called when a custom event is invoked.

Override this function, if needed.

Parameters

event: IMapEvent\<IMapObject\<IMapObjectProps, IMapObjectDefaults\<IMapObjectProps, IMapObjectConfig>, IMapObjectState\<IMapObjectProps, IMapObjectDefaults\<IMapObjectProps, IMapObjectConfig>, IMapObjectConfig, IMapObjectInitProps\<IMapObjectConfig>>, IMapObjectConfig, IMapObjectInitProps\<IMapObjectConfig>>>

Returns

void

Inherited from

MapTool.handleEvent

Source

model/internal/tool/MapTool.ts:171


hideLayerItems()

protected hideLayerItems(): void

Help function which hides layer items

This function is meant to be private.

Returns

void

Source

model/internal/layer/AbstractLayerTool.ts:147


initialize()

initialize(initProps): this

It initializes the state of the layer tool. It processes the serialized config and sets further objects.

This cannot be done in the object constructor since the object can be created before the Geovisto map is created.

Parameters

initProps: IMapToolInitProps\<ILayerToolConfig>

Returns

this

Implementation of

ILayerTool.initialize

Overrides

MapTool.initialize

Source

model/internal/layer/AbstractLayerTool.ts:82


isEnabled()

isEnabled(): boolean

Help getter which returns enabled property of state.

Do not override this function. Use the state class instead.

Returns

boolean

Implementation of

ILayerTool.isEnabled

Inherited from

MapTool.isEnabled

Source

model/internal/tool/MapTool.ts:130


isSingleton()

isSingleton(): boolean

Help getter which returns a logtical value whether the tool type is singleton.

Returns

boolean

Implementation of

ILayerTool.isSingleton

Inherited from

MapTool.isSingleton

Source

model/internal/tool/MapTool.ts:81


render()

render(type, animateOptions?): void

It reloads data and redraw the layer with respect to the type.

By default it works with LayerRedrawType

Parameters

type: number

animateOptions?: IDataChangeAnimateOptions

Returns

void

Implementation of

ILayerTool.render

Source

model/internal/layer/AbstractLayerTool.ts:189


setEnabled()

setEnabled(enabled): void

It changes layer state to enabled/disabled.

Parameters

enabled: boolean

Returns

void

Implementation of

ILayerTool.setEnabled

Overrides

MapTool.setEnabled

Source

model/internal/layer/AbstractLayerTool.ts:102


setProps()

protected setProps(props): void

It updates the props.

Parameters

props: IMapObjectProps

Returns

void

Inherited from

MapTool.setProps

Source

model/internal/object/MapObject.ts:38


showLayerItems()

protected showLayerItems(): void

Help function which shows layer items.

This function is meant to be private.

Returns

void

Source

model/internal/layer/AbstractLayerTool.ts:126


switchEnabled()

switchEnabled(): void

Help function which switches enabled state (enabled/disabled).

Do not override this function. Use setEnabled instead.

Returns

void

Implementation of

ILayerTool.switchEnabled

Inherited from

MapTool.switchEnabled

Source

model/internal/tool/MapTool.ts:158


updateDimension()

updateDimension(dimension, value, renderType): void

It updates the dimension.

Parameters

dimension: IMapDimension\<unknown>

value: string

renderType: undefined | number= undefined

Returns

void

Implementation of

ILayerTool.updateDimension

Source

model/internal/layer/AbstractLayerTool.ts:205