Skip to main content

ChoroplethLayerToolState

geovisto-mapReadme | API


geovisto-map / ChoroplethLayerToolState

Class: ChoroplethLayerToolState

This class provide functions for using the state of the layer tool.

Author

Jiri Hynek

Extends

Implements

Constructors

new ChoroplethLayerToolState()

new ChoroplethLayerToolState(tool): ChoroplethLayerToolState

It creates a tool state.

Parameters

tool: IChoroplethLayerTool\<IChoroplethLayerToolProps, IChoroplethLayerToolDefaults, IChoroplethLayerToolState\<IChoroplethLayerToolProps, IChoroplethLayerToolDefaults, IChoroplethLayerToolConfig, object, object>, IChoroplethLayerToolConfig, IMapToolInitProps\<IChoroplethLayerToolConfig>>

Returns

ChoroplethLayerToolState

Overrides

LayerToolState.constructor

Source

tools/layers/choropleth/model/internal/tool/ChoroplethLayerToolState.ts:30

Properties

bucketData

private bucketData: Map\<string, IMapAggregationBucket>

Source

tools/layers/choropleth/model/internal/tool/ChoroplethLayerToolState.ts:23


geoJSONlayer?

private optional geoJSONlayer: any

Source

tools/layers/choropleth/model/internal/tool/ChoroplethLayerToolState.ts:24


hoveredItem?

private optional hoveredItem: string

Source

tools/layers/choropleth/model/internal/tool/ChoroplethLayerToolState.ts:25


zindex

private zindex: number

Source

tools/layers/choropleth/model/internal/tool/ChoroplethLayerToolState.ts:22

Methods

deserialize()

deserialize(config): void

The metod takes config and deserializes the values.

Parameters

config: IChoroplethLayerToolConfig

Returns

void

Implementation of

IChoroplethLayerToolState.deserialize

Overrides

LayerToolState.deserialize

Source

tools/layers/choropleth/model/internal/tool/ChoroplethLayerToolState.ts:77


deserializeDimensions()

deserializeDimensions(dimensionsConfig): void

It sets the map layer dimensions property of tool state.

Parameters

dimensionsConfig

dimensionsConfig.aggregation?: string

dimensionsConfig.color?: string

dimensionsConfig.customColor?: boolean

dimensionsConfig.customMinMax?: boolean

dimensionsConfig.geoData?: string

dimensionsConfig.geoId?: string

dimensionsConfig.maxValue?: number

dimensionsConfig.minValue?: number

dimensionsConfig.range?: number

dimensionsConfig.round?: number

dimensionsConfig.scaling?: string

dimensionsConfig.units?: string

dimensionsConfig.unitsDesc?: string

dimensionsConfig.unitsEnabled?: boolean

dimensionsConfig.value?: string

Returns

void

Implementation of

IChoroplethLayerToolState.deserializeDimensions

Overrides

LayerToolState.deserializeDimensions

Source

tools/layers/choropleth/model/internal/tool/ChoroplethLayerToolState.ts:86


getBucketData()

getBucketData(): Map\<string, IMapAggregationBucket>

It returns the bucket data.

Returns

Map\<string, IMapAggregationBucket>

Implementation of

IChoroplethLayerToolState.getBucketData

Source

tools/layers/choropleth/model/internal/tool/ChoroplethLayerToolState.ts:206


getDimensions()

getDimensions(): object

It returns the map layer dimensions property of the tool state.

Returns

object

aggregation

aggregation: IMapDomainDimension\<IMapAggregationFunction>

color

color: IMapTypeDimension\<string, ITypeManager\<string>>

customColor

customColor: IMapTypeDimension\<boolean, ITypeManager\<boolean>>

customMinMax

customMinMax: IMapTypeDimension\<boolean, ITypeManager\<boolean>>

geoData

geoData: IMapDomainDimension\<IGeoData>

geoId

geoId: IMapDomainDimension\<IMapDataDomain>

maxValue

maxValue: IMapTypeDimension\<number, ITypeManager\<number>>

minValue

minValue: IMapTypeDimension\<number, ITypeManager\<number>>

range

range: IMapTypeDimension\<number, IIntegerRangeManager>

round

round: IMapTypeDimension\<number, ITypeManager\<number>>

scaling

scaling: IMapDomainDimension\<IScale>

units

units: IMapTypeDimension\<string, ITypeManager\<string>>

unitsDesc

unitsDesc: IMapTypeDimension\<string, ITypeManager\<string>>

unitsEnabled

unitsEnabled: IMapTypeDimension\<boolean, ITypeManager\<boolean>>

value

value: IMapDomainDimension\<IMapDataDomain>

Implementation of

IChoroplethLayerToolState.getDimensions

Overrides

LayerToolState.getDimensions

Source

tools/layers/choropleth/model/internal/tool/ChoroplethLayerToolState.ts:140


getGeoJSONLayer()

getGeoJSONLayer(): any

It returns a Leaflet geoJSON layer.

Returns

any

Implementation of

IChoroplethLayerToolState.getGeoJSONLayer

Source

tools/layers/choropleth/model/internal/tool/ChoroplethLayerToolState.ts:156


getHoveredItem()

getHoveredItem(): undefined | string

It returns the hovered item.

Returns

undefined | string

Implementation of

IChoroplethLayerToolState.getHoveredItem

Source

tools/layers/choropleth/model/internal/tool/ChoroplethLayerToolState.ts:172


getIcon()

getIcon(): string

It returns the icon property of the tool state.

Returns

string

Implementation of

IChoroplethLayerToolState.getIcon

Inherited from

LayerToolState.getIcon

Source

model/internal/tool/MapToolState.ts:120


getId()

getId(): string

It returns the id property of the tool state.

Returns

string

Implementation of

IChoroplethLayerToolState.getId

Inherited from

LayerToolState.getId

Source

model/internal/object/MapObjectState.ts:87


getLabel()

getLabel(): string

It returns the label property of the tool state.

Returns

string

Implementation of

IChoroplethLayerToolState.getLabel

Inherited from

LayerToolState.getLabel

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

IChoroplethLayerToolState.getLayerItems

Inherited from

LayerToolState.getLayerItems

Source

model/internal/layer/LayerToolState.ts:104


getLayerName()

getLayerName(): string

It returns the layer name property of the tool state.

Returns

string

Implementation of

IChoroplethLayerToolState.getLayerName

Inherited from

LayerToolState.getLayerName

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

IChoroplethLayerToolState.getMap

Inherited from

LayerToolState.getMap

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

LayerToolState.getMapObject

Source

model/internal/object/MapObjectState.ts:39


getType()

getType(): string

It returns the type property of the tool state.

Returns

string

Implementation of

IChoroplethLayerToolState.getType

Inherited from

LayerToolState.getType

Source

model/internal/object/MapObjectState.ts:80


getZIndex()

getZIndex(): number

It returns the z index.

Returns

number

Implementation of

IChoroplethLayerToolState.getZIndex

Source

tools/layers/choropleth/model/internal/tool/ChoroplethLayerToolState.ts:188


initialize()

initialize(defaults, props, initProps): void

It resets state with respect to initial props.

Parameters

defaults: IChoroplethLayerToolDefaults

props: IChoroplethLayerToolProps

initProps: IMapToolInitProps\<IChoroplethLayerToolConfig>

Returns

void

Implementation of

IChoroplethLayerToolState.initialize

Overrides

LayerToolState.initialize

Source

tools/layers/choropleth/model/internal/tool/ChoroplethLayerToolState.ts:41


isEnabled()

isEnabled(): boolean

It returns the enabled property of the tool state.

Returns

boolean

Implementation of

IChoroplethLayerToolState.isEnabled

Inherited from

LayerToolState.isEnabled

Source

model/internal/tool/MapToolState.ts:88


serialize()

serialize(defaults): IChoroplethLayerToolConfig

The method serializes the tool state. Optionally, defaults can be set if property is undefined.

Parameters

defaults: undefined | IChoroplethLayerToolDefaults

Returns

IChoroplethLayerToolConfig

Implementation of

IChoroplethLayerToolState.serialize

Overrides

LayerToolState.serialize

Source

tools/layers/choropleth/model/internal/tool/ChoroplethLayerToolState.ts:111


setBucketData()

setBucketData(bucketData): void

It sets the bucket data.

Parameters

bucketData: Map\<string, IMapAggregationBucket>

Returns

void

Implementation of

IChoroplethLayerToolState.setBucketData

Source

tools/layers/choropleth/model/internal/tool/ChoroplethLayerToolState.ts:215


setDimensions()

setDimensions(dimensions): void

It sets the map layer dimensions property of tool state.

Parameters

dimensions

dimensions.aggregation: IMapDomainDimension\<IMapAggregationFunction>

dimensions.color: IMapTypeDimension\<string, ITypeManager\<string>>

dimensions.customColor: IMapTypeDimension\<boolean, ITypeManager\<boolean>>

dimensions.customMinMax: IMapTypeDimension\<boolean, ITypeManager\<boolean>>

dimensions.geoData: IMapDomainDimension\<IGeoData>

dimensions.geoId: IMapDomainDimension\<IMapDataDomain>

dimensions.maxValue: IMapTypeDimension\<number, ITypeManager\<number>>

dimensions.minValue: IMapTypeDimension\<number, ITypeManager\<number>>

dimensions.range: IMapTypeDimension\<number, IIntegerRangeManager>

dimensions.round: IMapTypeDimension\<number, ITypeManager\<number>>

dimensions.scaling: IMapDomainDimension\<IScale>

dimensions.units: IMapTypeDimension\<string, ITypeManager\<string>>

dimensions.unitsDesc: IMapTypeDimension\<string, ITypeManager\<string>>

dimensions.unitsEnabled: IMapTypeDimension\<boolean, ITypeManager\<boolean>>

dimensions.value: IMapDomainDimension\<IMapDataDomain>

Returns

void

Implementation of

IChoroplethLayerToolState.setDimensions

Overrides

LayerToolState.setDimensions

Source

tools/layers/choropleth/model/internal/tool/ChoroplethLayerToolState.ts:149


setEnabled()

setEnabled(enabled): void

It sets the enabled property of tool state.

Parameters

enabled: boolean

Returns

void

Implementation of

IChoroplethLayerToolState.setEnabled

Inherited from

LayerToolState.setEnabled

Source

model/internal/tool/MapToolState.ts:97


setGeoJSONLayer()

setGeoJSONLayer(geoJSONlayer): void

It sets a Leaflet geoJSON layer.

Parameters

geoJSONlayer: GeoJSON

Returns

void

Implementation of

IChoroplethLayerToolState.setGeoJSONLayer

Source

tools/layers/choropleth/model/internal/tool/ChoroplethLayerToolState.ts:165


setHoveredItem()

setHoveredItem(hoveredItem): void

It sets the hovered item.

Parameters

hoveredItem: undefined | string

Returns

void

Implementation of

IChoroplethLayerToolState.setHoveredItem

Source

tools/layers/choropleth/model/internal/tool/ChoroplethLayerToolState.ts:181


setIcon()

setIcon(icon): void

It sets the icon property of the tool state.

Parameters

icon: string

Returns

void

Implementation of

IChoroplethLayerToolState.setIcon

Inherited from

LayerToolState.setIcon

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

IChoroplethLayerToolState.setId

Inherited from

LayerToolState.setId

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

IChoroplethLayerToolState.setLabel

Inherited from

LayerToolState.setLabel

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

IChoroplethLayerToolState.setLayerItems

Inherited from

LayerToolState.setLayerItems

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

IChoroplethLayerToolState.setLayerName

Inherited from

LayerToolState.setLayerName

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

Inherited from

LayerToolState.setMap

Source

model/internal/tool/MapToolState.ts:145


setZIndex()

setZIndex(zindex): void

It sets the z index.

Parameters

zindex: number

Returns

void

Implementation of

IChoroplethLayerToolState.setZIndex

Source

tools/layers/choropleth/model/internal/tool/ChoroplethLayerToolState.ts:197