MapObject
geovisto-map / MapObject
Class: MapObject
This class provide functions for using map object which can be identified by uniquie string.
Author
Jiri Hynek
Extended by
Implements
Constructors
new MapObject()
new MapObject(
props
?):MapObject
It creates a map object.
Parameters
• props?: IMapObjectProps
Returns
Source
model/internal/object/MapObject.ts:22
Properties
defaults
private
defaults:IMapObjectDefaults
\<IMapObjectProps
,IMapObjectConfig
>
Source
model/internal/object/MapObject.ts:16
props
private
props:IMapObjectProps
Source
model/internal/object/MapObject.ts:15
state
private
state:IMapObjectState
\<IMapObjectProps
,IMapObjectDefaults
\<IMapObjectProps
,IMapObjectConfig
>,IMapObjectConfig
,IMapObjectInitProps
\<IMapObjectConfig
>>
Source
model/internal/object/MapObject.ts:17
Methods
createDefaults()
protected
createDefaults():IMapObjectDefaults
\<IMapObjectProps
,IMapObjectConfig
>
It creates new defaults of the object.
This function can be overriden.
Returns
IMapObjectDefaults
\<IMapObjectProps
, IMapObjectConfig
>
Source
model/internal/object/MapObject.ts:61
createState()
protected
createState():IMapObjectState
\<IMapObjectProps
,IMapObjectDefaults
\<IMapObjectProps
,IMapObjectConfig
>,IMapObjectConfig
,IMapObjectInitProps
\<IMapObjectConfig
>>
It creates new state if the object.
This function can be overriden.
Returns
IMapObjectState
\<IMapObjectProps
, IMapObjectDefaults
\<IMapObjectProps
, IMapObjectConfig
>, IMapObjectConfig
, IMapObjectInitProps
\<IMapObjectConfig
>>
Source
model/internal/object/MapObject.ts:79
getDefaults()
getDefaults():
IMapObjectDefaults
\<IMapObjectProps
,IMapObjectConfig
>
It returns default values of the state properties.
Returns
IMapObjectDefaults
\<IMapObjectProps
, IMapObjectConfig
>
Implementation of
Source
model/internal/object/MapObject.ts:52
getId()
getId():
string
Help function which returns the id of the object.
Returns
string
Implementation of
Source
model/internal/object/MapObject.ts:93
getProps()
getProps():
IMapObjectProps
It returns the props given by the programmer.
Returns
Implementation of
Source
model/internal/object/MapObject.ts:45
getState()
getState():
IMapObjectState
\<IMapObjectProps
,IMapObjectDefaults
\<IMapObjectProps
,IMapObjectConfig
>,IMapObjectConfig
,IMapObjectInitProps
\<IMapObjectConfig
>>
It returns the tool state.
This function should not be overriden.
Returns
IMapObjectState
\<IMapObjectProps
, IMapObjectDefaults
\<IMapObjectProps
, IMapObjectConfig
>, IMapObjectConfig
, IMapObjectInitProps
\<IMapObjectConfig
>>
Implementation of
Source
model/internal/object/MapObject.ts:70
getType()
getType():
string
Help function which returns the type of the object.
Returns
string
Implementation of
Source
model/internal/object/MapObject.ts:86
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: IMapObjectInitProps
Returns
this
Implementation of
Source
model/internal/object/MapObject.ts:106
setProps()
protected
setProps(props
):void
It updates the props.
Parameters
• props: IMapObjectProps
Returns
void