Skip to main content

BubbleLayerTool

geovisto-map • Readme | API


geovisto-map / BubbleLayerTool

Class: BubbleLayerTool

This class represents Heat layer tool. It works with d3 to create bubble icons and Leaflet MarkerCluster Icons are created BubbleIcon

Author​

Vladimir Korencik

Author​

Petr Kaspar

Extends​

Implements​

Constructors​

new BubbleLayerTool()​

new BubbleLayerTool(props?): BubbleLayerTool

Parameters​

• props?: IBubbleLayerToolProps

Returns​

BubbleLayerTool

Overrides​

AbstractLayerTool.constructor

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:65

Properties​

mapForm​

private mapForm: IMapForm

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:62


max​

private max: number

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:63


selectionToolAPI​

private selectionToolAPI: undefined | ISelectionToolAPI

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:61

Methods​

aggregateValues()​

private aggregateValues(dataItem, aggregationDimension, foundValue): void

Parameters​

• dataItem: any

• aggregationDimension: IMapAggregationFunction

• foundValue: number

Returns​

void

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:307


copy()​

copy(): IBubbleLayerTool\<IBubbleLayerToolProps, IBubbleLayerToolDefaults, IBubbleLayerToolState\<IBubbleLayerToolProps, IBubbleLayerToolDefaults, IBubbleLayerToolConfig, object, object>, IBubbleLayerToolConfig, IMapToolInitProps\<IBubbleLayerToolConfig>>

It creates a copy of the uninitialized tool.

Returns​

IBubbleLayerTool\<IBubbleLayerToolProps, IBubbleLayerToolDefaults, IBubbleLayerToolState\<IBubbleLayerToolProps, IBubbleLayerToolDefaults, IBubbleLayerToolConfig, object, object>, IBubbleLayerToolConfig, IMapToolInitProps\<IBubbleLayerToolConfig>>

Implementation of​

IBubbleLayerTool.copy

Overrides​

AbstractLayerTool.copy

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:71


create()​

create(): this

It creates new layer with respect to configuration

Returns​

this

Implementation of​

IBubbleLayerTool.create

Inherited from​

AbstractLayerTool.create

Source​

model/internal/layer/AbstractLayerTool.ts:89


createDefaults()​

protected createDefaults(): IBubbleLayerToolDefaults

It creates new defaults of the layer tool.

Returns​

IBubbleLayerToolDefaults

Overrides​

AbstractLayerTool.createDefaults

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:87


createLayerItems()​

protected createLayerItems(): MarkerClusterGroup[]

It creates layer items.

Override this function.

Returns​

MarkerClusterGroup[]

Overrides​

AbstractLayerTool.createLayerItems

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:124


createMapForm()​

protected createMapForm(): IMapForm

Returns​

IMapForm

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:114


createMarker()​

protected createMarker(data): any

Parameters​

• data: any

Returns​

any

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:397


createMarkers()​

protected createMarkers(): void

Returns​

void

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:380


createPopupMessage()​

protected createPopupMessage(data): string

Parameters​

• data: IBubbleIconValues

Returns​

string

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:454


createState()​

protected createState(): IBubbleLayerToolState\<IBubbleLayerToolProps, IBubbleLayerToolDefaults, IBubbleLayerToolConfig, object, object>

It creates new defaults of the layer tool.

Returns​

IBubbleLayerToolState\<IBubbleLayerToolProps, IBubbleLayerToolDefaults, IBubbleLayerToolConfig, object, object>

Overrides​

AbstractLayerTool.createState

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:91


getAPIGetter()​

getAPIGetter(): undefined | IMapToolAPIGetter

It returns the tool API

Returns​

undefined | IMapToolAPIGetter

Implementation of​

IBubbleLayerTool.getAPIGetter

Inherited from​

AbstractLayerTool.getAPIGetter

Source​

model/internal/tool/MapTool.ts:74


getClusterValues()​

protected getClusterValues(childMarkers): IBubbleIconValues

Parameters​

• childMarkers: Marker[]

Returns​

IBubbleIconValues

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:426


getDefaults()​

getDefaults(): IBubbleLayerToolDefaults

It returns default values of the state properties.

Returns​

IBubbleLayerToolDefaults

Implementation of​

IBubbleLayerTool.getDefaults

Overrides​

AbstractLayerTool.getDefaults

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:79


getId()​

getId(): string

Help function which returns the id of the object.

Returns​

string

Implementation of​

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

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

IBubbleLayerTool.getMap

Inherited from​

AbstractLayerTool.getMap

Source​

model/internal/tool/MapTool.ts:112


getMapForm()​

getMapForm(): IMapForm

It returns a map control.

Returns​

IMapForm

Implementation of​

IMapFormControl.getMapForm

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:107


getProps()​

getProps(): IBubbleLayerToolProps

It returns the props given by the programmer.

Returns​

IBubbleLayerToolProps

Implementation of​

IBubbleLayerTool.getProps

Overrides​

AbstractLayerTool.getProps

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:75


getSelectionTool()​

private getSelectionTool(): undefined | ISelectionToolAPI

Returns​

undefined | ISelectionToolAPI

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:95


getState()​

getState(): IBubbleLayerToolState\<IBubbleLayerToolProps, IBubbleLayerToolDefaults, IBubbleLayerToolConfig, object, object>

It returns the map object state.

Returns​

IBubbleLayerToolState\<IBubbleLayerToolProps, IBubbleLayerToolDefaults, IBubbleLayerToolConfig, object, object>

Implementation of​

IBubbleLayerTool.getState

Overrides​

AbstractLayerTool.getState

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:83


getType()​

getType(): string

Help function which returns the type of the object.

Returns​

string

Implementation of​

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

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

Overrides​

AbstractLayerTool.handleEvent

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:501


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

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: IMapToolInitProps\<IBubbleLayerToolConfig>

Returns​

this

Implementation of​

IBubbleLayerTool.initialize

Overrides​

AbstractLayerTool.initialize

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:118


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​

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

IBubbleLayerTool.isSingleton

Inherited from​

AbstractLayerTool.isSingleton

Source​

model/internal/tool/MapTool.ts:81


prepareMapData()​

protected prepareMapData(): void

Returns​

void

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:178


render()​

render(type): void

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

By default it works with LayerRedrawType

Parameters​

• type: number

Returns​

void

Implementation of​

IBubbleLayerTool.render

Overrides​

AbstractLayerTool.render

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:357


setCategoryColor()​

private setCategoryColor(dataItem, category, value): void

Parameters​

• dataItem: any

• category: string

• value: number

Returns​

void

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:287


setEnabled()​

setEnabled(enabled): void

It changes layer state to enabled/disabled.

Parameters​

• enabled: boolean

Returns​

void

Implementation of​

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

IBubbleLayerTool.switchEnabled

Inherited from​

AbstractLayerTool.switchEnabled

Source​

model/internal/tool/MapTool.ts:158


updateDimension()​

updateDimension(dimension, value, redraw): void

It updates the dimension.

Parameters​

• dimension: IMapDomainDimension\<IMapDomain>

• value: string

• redraw: undefined | number

Returns​

void

Implementation of​

IBubbleLayerTool.updateDimension

Overrides​

AbstractLayerTool.updateDimension

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:476


updateStyle()​

protected updateStyle(): void

Returns​

void

Source​

tools/layers/bubble/model/internal/tool/BubbleLayerTool.ts:333