Skip to main content

IMapState

geovisto-mapReadme | API


geovisto-map / IMapState

Interface: IMapState\<TProps, TDefaults, TConfig>

This interface declares the state of the map. It wraps the state since the map can work with state objects which needs to be explicitly serialized.

Author

Jiri Hynek

Extends

Type parameters

TProps extends IMapProps = IMapProps

TDefaults extends IMapDefaults = IMapDefaults

TConfig extends IMapConfig = IMapConfig

Methods

deserialize()

deserialize(config): void

The metod takes config and deserializes the values.

Parameters

config: TConfig

Returns

void

Inherited from

IMapObjectState.deserialize

Source

model/types/object/IMapObjectState.ts:32


getCurrentData()

getCurrentData(): IMapData

It returns current data (might be filtered).

Returns

IMapData

Source

model/types/map/IMapState.ts:103


getEventManager()

getEventManager(): IMapEventManager

It returns the map event manager.

Returns

IMapEventManager

Source

model/types/map/IMapState.ts:49


getGeoDataManager()

getGeoDataManager(): IGeoDataManager

It returns the geo data manager.

Returns

IGeoDataManager

Source

model/types/map/IMapState.ts:127


getId()

getId(): string

It returns the id property of the map object state.

Returns

string

Inherited from

IMapObjectState.getId

Source

model/types/object/IMapObjectState.ts:49


getInitialMapCenter()

getInitialMapCenter(): object

It returns the initial map center.

TODO: remove from state (use defaults only)

Returns

object

lat

lat: number

lng

lng: number

Source

model/types/map/IMapState.ts:153


getInitialMapStructure()

getInitialMapStructure(): object

It returns the initial structure.

TODO: remove from state (use defaults only)

Returns

object

maxBounds

maxBounds: [[number, number], [number, number]]

maxZoom

maxZoom: number

Source

model/types/map/IMapState.ts:169


getInitialZoom()

getInitialZoom(): number

It returns the initial zoom level.

Returns

number

Source

model/types/map/IMapState.ts:139


getLeafletMap()

getLeafletMap(): any

It returns the Leaflet map.

Returns

any

Source

model/types/map/IMapState.ts:37


getMapConfig()

getMapConfig(): IMapConfigManager

It returns the map config manager.

Returns

IMapConfigManager

Source

model/types/map/IMapState.ts:115


getMapData()

getMapData(): IMapDataManager

It returns the map data manager.

Returns

IMapDataManager

Source

model/types/map/IMapState.ts:90


getToolTemplates()

getToolTemplates(): IMapToolsManager

It returns the tool manager providing tool templates.

Returns

IMapToolsManager

Source

model/types/map/IMapState.ts:66


getTools()

getTools(): IMapToolsManager

It returns tools manager providing tools.

Returns

IMapToolsManager

Source

model/types/map/IMapState.ts:78


getToolsAPI()

getToolsAPI(): Record\<string, () => IMapToolAPI>

It returns the map tools API.

Returns

Record\<string, () => IMapToolAPI>

Source

model/types/map/IMapState.ts:61


getType()

getType(): string

It returns the type property of the map object state.

Returns

string

Inherited from

IMapObjectState.getType

Source

model/types/object/IMapObjectState.ts:44


initialize()

initialize(defaults, props, initProps): void

It resets the state to the initial state.

Parameters

defaults: TDefaults

props: TProps

initProps: IMapInitProps\<TConfig>

Returns

void

Overrides

IMapObjectState.initialize

Source

model/types/map/IMapState.ts:32


serialize()

serialize(defaults): TConfig

The method serializes the map object state. Optionally, a serialized value can be let undefined if it equals the default value.

Parameters

defaults: undefined | TDefaults

Returns

TConfig

Inherited from

IMapObjectState.serialize

Source

model/types/object/IMapObjectState.ts:39


setCurrentData()

setCurrentData(data): void

It sets current data.

Parameters

data: IMapData

Returns

void

Source

model/types/map/IMapState.ts:110


setEventManager()

setEventManager(eventManager): void

It returns the map event manager.

Parameters

eventManager: IMapEventManager

Returns

void

Source

model/types/map/IMapState.ts:56


setGeoDataManager()

setGeoDataManager(geoDataManager): void

It sets a geo data manager.

Parameters

geoDataManager: IGeoDataManager

Returns

void

Source

model/types/map/IMapState.ts:134


setId()

setId(id): void

It sets the id property of the map object state. It can be set only once.

Parameters

id: string

Returns

void

Inherited from

IMapObjectState.setId

Source

model/types/object/IMapObjectState.ts:57


setInitialMapCenter()

setInitialMapCenter(mapCenter): void

It sets initial map center.

TODO: remove from state (use defaults only)

Parameters

mapCenter

mapCenter.lat: number

mapCenter.lng: number

Returns

void

Source

model/types/map/IMapState.ts:162


setInitialMapStructure()

setInitialMapStructure(mapStructure): void

It sets initial map structure.

TODO: remove from state (use defaults only)

Parameters

mapStructure

mapStructure.maxBounds: [[number, number], [number, number]]

mapStructure.maxZoom: number

Returns

void

Source

model/types/map/IMapState.ts:178


setInitialZoom()

setInitialZoom(zoom): void

It sets initial zoom level.

Parameters

zoom: number

Returns

void

Source

model/types/map/IMapState.ts:146


setLeafletMap()

setLeafletMap(map): void

It sets the Leaflet map.

Parameters

map: Map

Returns

void

Source

model/types/map/IMapState.ts:44


setMapConfig()

setMapConfig(mapConfigManager): void

It sets a map config manager.

Parameters

mapConfigManager: IMapConfigManager

Returns

void

Source

model/types/map/IMapState.ts:122


setMapData()

setMapData(mapData): void

It sets the map data manager. note: It also updates the current data.

Parameters

mapData: IMapDataManager

Returns

void

Source

model/types/map/IMapState.ts:98


setToolTemplates()

setToolTemplates(toolTemplates): void

It sets the tool templates providing tool templates.

Parameters

toolTemplates: IMapToolsManager

Returns

void

Source

model/types/map/IMapState.ts:73


setTools()

setTools(tools): void

It sets tools manager providing tools.

Parameters

tools: IMapToolsManager

Returns

void

Source

model/types/map/IMapState.ts:85