Skip to main content

MarkerLayerTool

geovisto-map • Readme | API


geovisto-map / MarkerLayerTool

Class: MarkerLayerTool

This class represents Marker layer tool. It works with geojson polygons representing countries.

Author​

Jiri Hynek

Extends​

Implements​

Constructors​

new MarkerLayerTool()​

new MarkerLayerTool(props?): MarkerLayerTool

It creates a new tool with respect to the props.

Parameters​

• props?: IMarkerLayerToolProps

Returns​

MarkerLayerTool

Overrides​

AbstractLayerTool.constructor

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:96

Properties​

mapForm​

private mapForm: IMapForm

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:88


mapLegend​

private mapLegend: IMapLegend

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:89


selectionToolAPI​

private selectionToolAPI: undefined | ISelectionToolAPI

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:86


themesToolAPI​

private themesToolAPI: undefined | IThemesToolAPI

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:87

Methods​

copy()​

copy(): IMarkerLayerTool\<IMarkerLayerToolProps, IMarkerLayerToolDefaults, IMarkerLayerToolState\<IMarkerLayerToolProps, IMarkerLayerToolDefaults, IMarkerLayerToolConfig, object, object>, IMarkerLayerToolConfig, IMapToolInitProps\<IMarkerLayerToolConfig>>

It creates a copy of the uninitialized tool.

Returns​

IMarkerLayerTool\<IMarkerLayerToolProps, IMarkerLayerToolDefaults, IMarkerLayerToolState\<IMarkerLayerToolProps, IMarkerLayerToolDefaults, IMarkerLayerToolConfig, object, object>, IMarkerLayerToolConfig, IMapToolInitProps\<IMarkerLayerToolConfig>>

Implementation of​

IMarkerLayerTool.copy

Overrides​

AbstractLayerTool.copy

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:103


create()​

create(): this

It creates new layer with respect to configuration

Returns​

this

Implementation of​

IMarkerLayerTool.create

Inherited from​

AbstractLayerTool.create

Source​

model/internal/layer/AbstractLayerTool.ts:89


createDefaults()​

protected createDefaults(): IMarkerLayerToolDefaults

It creates new defaults of the tool.

Returns​

IMarkerLayerToolDefaults

Overrides​

AbstractLayerTool.createDefaults

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:124


createLayerItems()​

protected createLayerItems(): Layer[]

It creates layer items.

Returns​

Layer[]

Overrides​

AbstractLayerTool.createLayerItems

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:214


createMapForm()​

protected createMapForm(): IMapForm

It creates new tab control.

Returns​

IMapForm

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:191


createMapLegend()​

protected createMapLegend(): IMapLegend

It creates new legend control.

Returns​

IMapLegend

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:198


createMarker()​

protected createMarker(pointFeature, bucketMap): IMarker\<IMarkerIcon\<any>>

It creates one marker with respect to the given GeoJSON point feature and data.

Parameters​

• pointFeature: Feature

• bucketMap: Map\<string, null | IMapAggregationBucket>

Returns​

IMarker\<IMarkerIcon\<any>>

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:457


createMarkers()​

protected createMarkers(): IMarker\<IMarkerIcon\<any>>[]

It creates markers using bucket data

Returns​

IMarker\<IMarkerIcon\<any>>[]

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:401


createState()​

protected createState(): IMarkerLayerToolState\<IMarkerLayerToolProps, IMarkerLayerToolDefaults, IMarkerLayerToolConfig, object, object>

It returns default tool state.

Returns​

IMarkerLayerToolState\<IMarkerLayerToolProps, IMarkerLayerToolDefaults, IMarkerLayerToolConfig, object, object>

Overrides​

AbstractLayerTool.createState

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:138


deleteLayerItems()​

protected deleteLayerItems(): void

It deletes layer items.

Returns​

void

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:252


getAPIGetter()​

getAPIGetter(): undefined | IMapToolAPIGetter

It returns the tool API

Returns​

undefined | IMapToolAPIGetter

Implementation of​

IMarkerLayerTool.getAPIGetter

Inherited from​

AbstractLayerTool.getAPIGetter

Source​

model/internal/tool/MapTool.ts:74


getDefaults()​

getDefaults(): IMarkerLayerToolDefaults

It returns default values of the state properties.

Returns​

IMarkerLayerToolDefaults

Implementation of​

IMarkerLayerTool.getDefaults

Overrides​

AbstractLayerTool.getDefaults

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:117


getId()​

getId(): string

Help function which returns the id of the object.

Returns​

string

Implementation of​

IMarkerLayerTool.getId

Inherited from​

AbstractLayerTool.getId

Source​

model/internal/object/MapObject.ts:93


getLayerItems()​

getLayerItems(): Layer[]

It returns layer items which should be rendered.

Returns​

Layer[]

Implementation of​

IMarkerLayerTool.getLayerItems

Inherited from​

AbstractLayerTool.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​

IMarkerLayerTool.getMap

Inherited from​

AbstractLayerTool.getMap

Source​

model/internal/tool/MapTool.ts:112


getMapForm()​

getMapForm(): IMapForm

It returns a sidebar tab with respect to the configuration.

Returns​

IMapForm

Implementation of​

IMapFormControl.getMapForm

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:171


getMapLegend()​

getMapLegend(): IMapLegend

It returns a legend with respect to the configuration.

Returns​

IMapLegend

Implementation of​

IMapLegendControl.getMapLegend

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:181


getProps()​

getProps(): IMarkerLayerToolProps

It returns the props given by the programmer.

Returns​

IMarkerLayerToolProps

Implementation of​

IMarkerLayerTool.getProps

Overrides​

AbstractLayerTool.getProps

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:110


getSelectionTool()​

private getSelectionTool(): undefined | ISelectionToolAPI

Help function which acquires and returns the selection tool if available.

Returns​

undefined | ISelectionToolAPI

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:145


getState()​

getState(): IMarkerLayerToolState\<IMarkerLayerToolProps, IMarkerLayerToolDefaults, IMarkerLayerToolConfig, object, object>

It returns the layer tool state.

Returns​

IMarkerLayerToolState\<IMarkerLayerToolProps, IMarkerLayerToolDefaults, IMarkerLayerToolConfig, object, object>

Implementation of​

IMarkerLayerTool.getState

Overrides​

AbstractLayerTool.getState

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:131


getThemesTool()​

private getThemesTool(): undefined | IThemesToolAPI

Help function which acquires and returns the themes tool if available.

Returns​

undefined | IThemesToolAPI

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:158


getType()​

getType(): string

Help function which returns the type of the object.

Returns​

string

Implementation of​

IMarkerLayerTool.getType

Inherited from​

AbstractLayerTool.getType

Source​

model/internal/object/MapObject.ts:86


handleEvent()​

handleEvent(event): void

This function is called when a custom event is invoked.

Parameters​

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

Returns​

void

Overrides​

AbstractLayerTool.handleEvent

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:611


hideLayerItems()​

protected hideLayerItems(): void

Help function which hides layer items

This function is meant to be private.

Returns​

void

Inherited from​

AbstractLayerTool.hideLayerItems

Source​

model/internal/layer/AbstractLayerTool.ts:147


initialize()​

initialize(initProps): this

Overrides the super method.

Parameters​

• initProps: IMapToolInitProps\<IMarkerLayerToolConfig>

Returns​

this

Implementation of​

IMarkerLayerTool.initialize

Overrides​

AbstractLayerTool.initialize

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:207


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​

IMarkerLayerTool.isEnabled

Inherited from​

AbstractLayerTool.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​

IMarkerLayerTool.isSingleton

Inherited from​

AbstractLayerTool.isSingleton

Source​

model/internal/tool/MapTool.ts:81


render()​

render(type, animateOptions?): void

It reloads data and redraw the layer.

Parameters​

• type: number

• animateOptions?: IDataChangeAnimateOptions

Returns​

void

Implementation of​

IMarkerLayerTool.render

Overrides​

AbstractLayerTool.render

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:557


setEnabled()​

setEnabled(enabled): void

It changes layer state to enabled/disabled.

Parameters​

• enabled: boolean

Returns​

void

Implementation of​

IMarkerLayerTool.setEnabled

Inherited from​

AbstractLayerTool.setEnabled

Source​

model/internal/layer/AbstractLayerTool.ts:102


setProps()​

protected setProps(props): void

It updates the props.

Parameters​

• props: IMapObjectProps

Returns​

void

Inherited from​

AbstractLayerTool.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

Inherited from​

AbstractLayerTool.showLayerItems

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​

IMarkerLayerTool.switchEnabled

Inherited from​

AbstractLayerTool.switchEnabled

Source​

model/internal/tool/MapTool.ts:158


updateCategoryValues()​

protected updateCategoryValues(): void

Help function which updates the current category values based on map current data.

This should be called only when animated render is not required.

Returns​

void

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:593


updateData()​

protected updateData(): Map\<string, Map\<string, null | IMapAggregationBucket>>

It prepares data for markers.

Returns​

Map\<string, Map\<string, null | IMapAggregationBucket>>

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:265


updateDimension()​

updateDimension(dimension, value, redraw): void

It updates the dimension.

Parameters​

• dimension: IMapDomainDimension\<IMapDomain>

• value: string

• redraw: undefined | number

Returns​

void

Implementation of​

IMarkerLayerTool.updateDimension

Overrides​

AbstractLayerTool.updateDimension

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:533


updateMarkers()​

protected updateMarkers(animateOptions): void

Help method which updates existing markers and applies animation options

Parameters​

• animateOptions: IDataChangeAnimateOptions

Returns​

void

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:489


updateTheme()​

protected updateTheme(theme): void

Help function which updates theme with respect to the Themes Tool API.

TODO: move to adapter

Parameters​

• theme: IMapTheme

Returns​

void

Source​

tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:644