Skip to main content

IMap

geovisto-map • Readme | API


geovisto-map / IMap

Interface: IMap\<TProps, TDefaults, TState, TConfig, TInitProps>

Declaration of map wrapper which handles map inputs (data, props, config), map tools and other map objects.

Author​

Jiri Hynek

Extends​

  • IMapObject\<TProps, TDefaults, TState, TConfig, TInitProps>

Type parameters​

• TProps extends IMapProps = IMapProps

• TDefaults extends IMapDefaults = IMapDefaults

• TState extends IMapState = IMapState

• TConfig extends IMapConfig = IMapConfig

• TInitProps extends IMapInitProps\<TConfig> = IMapInitProps\<TConfig>

Methods​

draw()​

draw(mapConfig): null | HTMLElement

The function draws a new map.

Parameters​

• mapConfig: IMapConfigManager

Returns​

null | HTMLElement

Source​

model/types/map/IMap.ts:28


export()​

export(): Record\<string, unknown>

It exports the serialized representation of the current state of the map.

Returns​

Record\<string, unknown>

Source​

model/types/map/IMap.ts:38


getDefaults()​

getDefaults(): TDefaults

It returns default values of the state properties.

Returns​

TDefaults

Inherited from​

IMapObject.getDefaults

Source​

model/types/object/IMapObject.ts:27


getId()​

getId(): string

Help function which returns the id of the object.

Returns​

string

Inherited from​

IMapObject.getId

Source​

model/types/object/IMapObject.ts:42


getProps()​

getProps(): TProps

It returns the props given by the programmer.

Returns​

TProps

Inherited from​

IMapObject.getProps

Source​

model/types/object/IMapObject.ts:22


getState()​

getState(): TState

It returns the map object state.

Returns​

TState

Inherited from​

IMapObject.getState

Source​

model/types/object/IMapObject.ts:32


getType()​

getType(): string

Help function which returns the type of the object.

Returns​

string

Inherited from​

IMapObject.getType

Source​

model/types/object/IMapObject.ts:37


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: TInitProps

Returns​

this

Inherited from​

IMapObject.initialize

Source​

model/types/object/IMapObject.ts:53


redraw()​

redraw(mapConfig, props?): null | HTMLElement

This function redraws the current map.

Parameters​

• mapConfig: IMapConfigManager

• props?: IMapProps

Returns​

null | HTMLElement

Source​

model/types/map/IMap.ts:33


updateCurrentData()​

updateCurrentData(data, source, animateOptions?): void

It updates current data and notifies listeners.

Parameters​

• data: IMapData

• source: IMapObject\<IMapObjectProps, IMapObjectDefaults\<IMapObjectProps, IMapObjectConfig>, IMapObjectState\<IMapObjectProps, IMapObjectDefaults\<IMapObjectProps, IMapObjectConfig>, IMapObjectConfig, IMapObjectInitProps\<IMapObjectConfig>>, IMapObjectConfig, IMapObjectInitProps\<IMapObjectConfig>>

of the change

• animateOptions?: IDataChangeAnimateOptions

Returns​

void

Source​

model/types/map/IMap.ts:61


updateData()​

updateData(dataManager): void

It updates data and notifies listeners.

Parameters​

• dataManager: IMapDataManager

Returns​

void

Source​

model/types/map/IMap.ts:45


updateGeoData()​

updateGeoData(geoDataManager): void

It updates geo data and notifies listeners.

Parameters​

• geoDataManager: IGeoDataManager

Returns​

void

Source​

model/types/map/IMap.ts:52