Skip to main content

MapObjectsManager

geovisto-mapReadme | API


geovisto-map / MapObjectsManager

Class: MapObjectsManager\<T>

This class provide functions for using map objects which can be identified by uniquie string.

Author

Jiri Hynek

Extended by

Type parameters

T extends IMapObject

Implements

Constructors

new MapObjectsManager()

new MapObjectsManager\<T>(objects): MapObjectsManager\<T>

It initializes a map objects manager.

Parameters

objects: undefined | T[]

Returns

MapObjectsManager\<T>

Source

model/internal/object/MapObjectsManager.ts:16

Properties

objects

private objects: T[]

Source

model/internal/object/MapObjectsManager.ts:11

Methods

add()

add(object): void

It adds object to the list of objects.

Override this function.

Parameters

object: T

Returns

void

Implementation of

IMapObjectsManager.add

Source

model/internal/object/MapObjectsManager.ts:48


getAll()

getAll(): T[]

The function returns available map objects.

Returns

T[]

Implementation of

IMapObjectsManager.getAll

Source

model/internal/object/MapObjectsManager.ts:23


getById()

getById(id): undefined | T

The function returns map object of given unique identifier.

Parameters

id: string

Returns

undefined | T

Implementation of

IMapObjectsManager.getById

Source

model/internal/object/MapObjectsManager.ts:123


getByType()

getByType(type): T[]

The function returns map objects of given type.

Parameters

type: string

Returns

T[]

Implementation of

IMapObjectsManager.getByType

Source

model/internal/object/MapObjectsManager.ts:105


getIds()

getIds(): string[]

Help function which returns the list of object string labels (object types).

Returns

string[]

Implementation of

IMapObjectsManager.getIds

Source

model/internal/object/MapObjectsManager.ts:89


getTypes()

getTypes(): string[]

Help function which returns the list of object string labels (object types).

Returns

string[]

Implementation of

IMapObjectsManager.getTypes

Source

model/internal/object/MapObjectsManager.ts:75


isEmpty()

isEmpty(): boolean

The function returns true if size() is 0.

Returns

boolean

Implementation of

IMapObjectsManager.isEmpty

Source

model/internal/object/MapObjectsManager.ts:37


remove()

remove(object): void

It removes object from the list of objects.

Parameters

object: T

Returns

void

Implementation of

IMapObjectsManager.remove

Source

model/internal/object/MapObjectsManager.ts:57


removeById()

removeById(id): void

It removes object from the list of objects.

Override this function.

Parameters

id: string

Returns

void

Implementation of

IMapObjectsManager.removeById

Source

model/internal/object/MapObjectsManager.ts:68


size()

size(): number

The function returns number of objects.

Returns

number

Implementation of

IMapObjectsManager.size

Source

model/internal/object/MapObjectsManager.ts:30