LegendTool
geovisto-map / LegendTool
Class: LegendTool
This class provides the legend tool.
Author
Tomas Koscielniak
Extends
Implements
Constructors
new LegendTool()
new LegendTool(
props
?):LegendTool
It creates a new tool with respect to the props.
Parameters
• props?: IMapToolProps
Returns
Overrides
Source
tools/legend/model/internal/tool/LegendTool.ts:38
Methods
clearLegend()
clearLegend(
owner
):void
This function clears legend.
Parameters
• owner: undefined
| string
Returns
void
Source
tools/legend/model/internal/tool/LegendTool.ts:156
copy()
copy():
ILegendTool
\<IMapToolProps
,ILegendToolDefaults
,ILegendToolState
\<IMapToolProps
,ILegendToolDefaults
,ILegendToolConfig
>,ILegendToolConfig
,IMapToolInitProps
\<ILegendToolConfig
>>
It creates a copy of the uninitialized tool.
Returns
ILegendTool
\<IMapToolProps
, ILegendToolDefaults
, ILegendToolState
\<IMapToolProps
, ILegendToolDefaults
, ILegendToolConfig
>, ILegendToolConfig
, IMapToolInitProps
\<ILegendToolConfig
>>
Implementation of
Overrides
Source
tools/legend/model/internal/tool/LegendTool.ts:45
create()
create():
this
It creates legend.
Returns
this
Implementation of
Overrides
Source
tools/legend/model/internal/tool/LegendTool.ts:96
createDefaults()
protected
createDefaults():ILegendToolDefaults
It creates new defaults of the tool.
Returns
Overrides
Source
tools/legend/model/internal/tool/LegendTool.ts:66
createLegend()
protected
createLegend():void
It creates a legend tool and its parts (new legend for each layer that implements it).
Returns
void
Source
tools/legend/model/internal/tool/LegendTool.ts:106
createState()
protected
createState():ILegendToolState
\<IMapToolProps
,ILegendToolDefaults
,ILegendToolConfig
>
It returns default tool state.
Returns
ILegendToolState
\<IMapToolProps
, ILegendToolDefaults
, ILegendToolConfig
>
Overrides
Source
tools/legend/model/internal/tool/LegendTool.ts:80
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():
ILegendToolDefaults
It returns default values of the legend tool.
Returns
Implementation of
Overrides
Source
tools/legend/model/internal/tool/LegendTool.ts:59
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
getProps()
getProps():
IMapToolProps
It returns the props given by the programmer.
Returns
Implementation of
Overrides
Source
tools/legend/model/internal/tool/LegendTool.ts:52
getState()
getState():
ILegendToolState
\<IMapToolProps
,ILegendToolDefaults
,ILegendToolConfig
>
It returns the legend tool state.
Returns
ILegendToolState
\<IMapToolProps
, ILegendToolDefaults
, ILegendToolConfig
>
Implementation of
Overrides
Source
tools/legend/model/internal/tool/LegendTool.ts:73
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/legend/model/internal/tool/LegendTool.ts:168
initialize()
initialize(
initProps
):this
Overrides the super method.
Parameters
• initProps: IMapToolInitProps
\<ILegendToolConfig
>
Returns
this
Implementation of
Overrides
Source
tools/legend/model/internal/tool/LegendTool.ts:89
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