HierarchyTool
geovisto-map / HierarchyTool
Class: HierarchyTool
Hierarchy tool provides configuration parsing for hierarchy, sets hierarchy trees for geoDataManager and later dispatches event in case of zoom/geo data change event.
Authorβ
MalΓ½ VojtΔch
Extendsβ
Implementsβ
Constructorsβ
new HierarchyTool()β
new HierarchyTool(
props
?):HierarchyTool
Parametersβ
β’ props?: IMapToolProps
Returnsβ
Overridesβ
Sourceβ
tools/hierarchy/model/internal/tool/HierarchyTool.ts:35
Propertiesβ
changeLastZoomβ
private
changeLastZoom:string
[] =[]
Sourceβ
tools/hierarchy/model/internal/tool/HierarchyTool.ts:32
changeStructβ
private
changeStruct:Map
\<string
, [boolean
,number
]>
Sourceβ
tools/hierarchy/model/internal/tool/HierarchyTool.ts:31
managerβ
private
manager:HierarchyToolManager
Sourceβ
tools/hierarchy/model/internal/tool/HierarchyTool.ts:28
mapFormβ
private
mapForm:HieararchyToolMapForm
Sourceβ
tools/hierarchy/model/internal/tool/HierarchyTool.ts:27
Methodsβ
copy()β
copy():
IHierarchyTool
\<IMapToolProps
,IHierarchyToolDefaults
,IHierarchyToolState
\<IMapToolProps
,IHierarchyToolDefaults
,IHierarchyToolConfig
>,IHierarchyToolConfig
,IMapToolInitProps
\<IHierarchyToolConfig
>>
It creates a copy of the uninitialized tool.
Returnsβ
IHierarchyTool
\<IMapToolProps
, IHierarchyToolDefaults
, IHierarchyToolState
\<IMapToolProps
, IHierarchyToolDefaults
, IHierarchyToolConfig
>, IHierarchyToolConfig
, IMapToolInitProps
\<IHierarchyToolConfig
>>
Implementation ofβ
Overridesβ
Sourceβ
tools/hierarchy/model/internal/tool/HierarchyTool.ts:76
create()β
create():
this
It creates a tool.
Returnsβ
this
Implementation ofβ
Overridesβ
Sourceβ
tools/hierarchy/model/internal/tool/HierarchyTool.ts:81
createDefaults()β
createDefaults():
IHierarchyToolDefaults
It creates new defaults of the tool.
Returnsβ
Overridesβ
Sourceβ
tools/hierarchy/model/internal/tool/HierarchyTool.ts:50
createMapForm()β
protected
createMapForm():IMapForm
Returnsβ
Sourceβ
tools/hierarchy/model/internal/tool/HierarchyTool.ts:54
createState()β
createState():
IHierarchyToolState
\<IMapToolProps
,IHierarchyToolDefaults
,IHierarchyToolConfig
>
It creates new defaults of the tool.
Returnsβ
IHierarchyToolState
\<IMapToolProps
, IHierarchyToolDefaults
, IHierarchyToolConfig
>
Overridesβ
Sourceβ
tools/hierarchy/model/internal/tool/HierarchyTool.ts:72
getAPIGetter()β
getAPIGetter():
undefined
|IMapToolAPIGetter
It returns the tool API
Returnsβ
undefined
| IMapToolAPIGetter
Implementation ofβ
Inherited fromβ
Sourceβ
model/internal/tool/MapTool.ts:74
getDefaults()β
getDefaults():
IHierarchyToolDefaults
It returns default values of the state properties.
Returnsβ
Implementation ofβ
Overridesβ
Sourceβ
tools/hierarchy/model/internal/tool/HierarchyTool.ts:46
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
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 map control.
Returnsβ
Implementation ofβ
Sourceβ
tools/hierarchy/model/internal/tool/HierarchyTool.ts:39
getProps()β
getProps():
IMapToolProps
Help function which returns the props given by the programmer.
Returnsβ
Implementation ofβ
Inherited fromβ
Sourceβ
model/internal/tool/MapTool.ts:39
getState()β
getState():
IHierarchyToolState
\<IMapToolProps
,IHierarchyToolDefaults
,IHierarchyToolConfig
>
It returns the map object state.
Returnsβ
IHierarchyToolState
\<IMapToolProps
, IHierarchyToolDefaults
, IHierarchyToolConfig
>
Implementation ofβ
Overridesβ
Sourceβ
tools/hierarchy/model/internal/tool/HierarchyTool.ts:68
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.
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
Inherited fromβ
Sourceβ
model/internal/tool/MapTool.ts:171
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
\<IMapToolConfig
>
Returnsβ
this
Implementation ofβ
Overridesβ
Sourceβ
tools/hierarchy/model/internal/tool/HierarchyTool.ts:58
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
setEnabled()β
setEnabled(
enabled
):void
Some tools might be dynamicaly enabled/disabled. This function is called externally when the tool is enabled/disabled.
Override this function, if needed.
Parametersβ
β’ enabled: boolean
Returnsβ
void
Implementation ofβ
Inherited fromβ
Sourceβ
model/internal/tool/MapTool.ts:142
setProps()β
protected
setProps(props
):void
It updates the props.
Parametersβ
β’ props: IMapObjectProps
Returnsβ
void
Inherited fromβ
Sourceβ
model/internal/object/MapObject.ts:38
switchEnabled()β
switchEnabled():
void
Help function which switches enabled state (enabled/disabled).
Do not override this function. Use setEnabled instead.
Returnsβ
void
Implementation ofβ
Inherited fromβ
Sourceβ
model/internal/tool/MapTool.ts:158
updateChangeStruct()β
private
updateChangeStruct(zoom
):void
Private method to update data in change structer.
Parametersβ
β’ zoom: number
New level of zoom.
Returnsβ
void
Sourceβ
tools/hierarchy/model/internal/tool/HierarchyTool.ts:156
zoomChanged()β
private
zoomChanged():void
Method called whenever zoom changes.
Returnsβ
void