MarkerLayerTool
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
Overrides
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
Overrides
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
Inherited from
Source
model/internal/layer/AbstractLayerTool.ts:89
createDefaults()
protected
createDefaults():IMarkerLayerToolDefaults
It creates new defaults of the tool.
Returns
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
Source
tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:191
createMapLegend()
protected
createMapLegend():IMapLegend
It creates new legend control.
Returns
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
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
Inherited from
AbstractLayerTool
.getAPIGetter
Source
model/internal/tool/MapTool.ts:74
getDefaults()
getDefaults():
IMarkerLayerToolDefaults
It returns default values of the state properties.
Returns
Implementation of
Overrides
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
Inherited from
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
Inherited from
Source
model/internal/tool/MapTool.ts:112
getMapForm()
getMapForm():
IMapForm
It returns a sidebar tab with respect to the configuration.
Returns
Implementation of
Source
tools/layers/marker/model/internal/tool/MarkerLayerTool.ts:171
getMapLegend()
getMapLegend():
IMapLegend
It returns a legend with respect to the configuration.
Returns
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
Implementation of
Overrides
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
Overrides
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
Inherited from
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
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
Overrides
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
Inherited from
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
Inherited from
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
Overrides
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
Inherited from
Source
model/internal/layer/AbstractLayerTool.ts:102
setProps()
protected
setProps(props
):void
It updates the props.
Parameters
• props: IMapObjectProps
Returns
void
Inherited from
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