Skip to main content

IMapTool

geovisto-map • Readme | API


geovisto-map / IMapTool

Interface: IMapTool\<TProps, TDefaults, TState, TConfig, TInitProps, TAPI>

This interface declares functions for using map tool which can be identified by uniquie string.

Author​

Jiri Hynek

Extends​

  • IMapObject\<TProps, TDefaults, TState, TConfig, TInitProps>

Type parameters​

• TProps extends IMapToolProps = IMapToolProps

• TDefaults extends IMapToolDefaults = IMapToolDefaults

• TState extends IMapToolState = IMapToolState

• TConfig extends IMapToolConfig = IMapToolConfig

• TInitProps extends IMapToolInitProps\<TConfig> = IMapToolInitProps\<TConfig>

• TAPI extends IMapToolAPI = IMapToolAPI

Methods​

copy()​

copy(): IMapTool\<IMapToolProps, IMapToolDefaults, IMapToolState\<IMapToolProps, IMapToolDefaults, IMapToolConfig, IMapToolInitProps\<IMapToolConfig>>, IMapToolConfig, IMapToolInitProps\<IMapToolConfig>, IMapToolAPI>

It creates copy of the uninitialized tool.

Returns​

IMapTool\<IMapToolProps, IMapToolDefaults, IMapToolState\<IMapToolProps, IMapToolDefaults, IMapToolConfig, IMapToolInitProps\<IMapToolConfig>>, IMapToolConfig, IMapToolInitProps\<IMapToolConfig>, IMapToolAPI>

Source​

model/types/tool/IMapTool.ts:27


create()​

create(): this

It creates a tool.

Returns​

this

Source​

model/types/tool/IMapTool.ts:47


getAPIGetter()​

getAPIGetter(): undefined | IMapToolAPIGetter\<TAPI>

It returns the tool API.

Returns​

undefined | IMapToolAPIGetter\<TAPI>

Source​

model/types/tool/IMapTool.ts:32


getDefaults()​

getDefaults(): TDefaults

It returns default values of the state properties.

Returns​

TDefaults

Inherited from​

IMapObject.getDefaults

Source​

model/types/object/IMapObject.ts:27


getId()​

getId(): string

Help function which returns the id of the object.

Returns​

string

Inherited from​

IMapObject.getId

Source​

model/types/object/IMapObject.ts:42


getMap()​

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

Help function which returns map which uses this tool.

Returns​

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

Source​

model/types/tool/IMapTool.ts:42


getProps()​

getProps(): TProps

It returns the props given by the programmer.

Returns​

TProps

Inherited from​

IMapObject.getProps

Source​

model/types/object/IMapObject.ts:22


getState()​

getState(): TState

It returns the map object state.

Returns​

TState

Inherited from​

IMapObject.getState

Source​

model/types/object/IMapObject.ts:32


getType()​

getType(): string

Help function which returns the type of the object.

Returns​

string

Inherited from​

IMapObject.getType

Source​

model/types/object/IMapObject.ts:37


initialize()​

initialize(initProps): this

It initializes the state of the object. 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: TInitProps

Returns​

this

Inherited from​

IMapObject.initialize

Source​

model/types/object/IMapObject.ts:53


isEnabled()​

isEnabled(): boolean

Help getter which returns enabled property of state.

Returns​

boolean

Source​

model/types/tool/IMapTool.ts:52


isSingleton()​

isSingleton(): boolean

It returns a logical value whether the tool type is singleton.

Returns​

boolean

Source​

model/types/tool/IMapTool.ts:37


setEnabled()​

setEnabled(enabled): void

Some tools might be dynamicaly enabled/disabled. This function is called externally when the tool is enabled/disabled.

Parameters​

• enabled: boolean

Returns​

void

Source​

model/types/tool/IMapTool.ts:60


switchEnabled()​

switchEnabled(): void

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

Returns​

void

Source​

model/types/tool/IMapTool.ts:65