Skip to main content

Class: DefaultMapSystemContext<Modules, Layers, Controllers>

An implementation of the base properties in MapSystemContext.

Type parameters

NameType
Modulesextends ModuleRecord = EmptyRecord
Layersextends LayerRecord = EmptyRecord
Controllersextends ControllerRecord = EmptyRecord

Constructors

constructor

new DefaultMapSystemContext<Modules, Layers, Controllers>(bus, projection, projectedSize, deadZone): DefaultMapSystemContext<Modules, Layers, Controllers>

Creates an instance of a MapSystemContext.

Type parameters

NameType
Modulesextends ModuleRecord = EmptyRecord
Layersextends LayerRecord = EmptyRecord
Controllersextends ControllerRecord = EmptyRecord

Parameters

NameTypeDescription
busEventBusThis context's event bus.
projectionMapProjectionThis context's map projection.
projectedSizeSubscribable<Readonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>>A subscribable which provides the projected size of this context's map.
deadZoneSubscribable<Readonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>>A subscribable which provides the dead zone of this context's map.

Returns

DefaultMapSystemContext<Modules, Layers, Controllers>

Defined in

src/sdk/components/mapsystem/MapSystemContext.ts:91

Properties

bus

Readonly bus: EventBus

This context's event bus.

Defined in

src/sdk/components/mapsystem/MapSystemContext.ts:92


deadZone

Readonly deadZone: Subscribable<Readonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>>

A subscribable which provides the dead zone of this context's map.

Defined in

src/sdk/components/mapsystem/MapSystemContext.ts:95


model

Readonly model: MapModel<Modules>

This context's map model.

Defined in

src/sdk/components/mapsystem/MapSystemContext.ts:79


projectedSize

Readonly projectedSize: Subscribable<Readonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>>

A subscribable which provides the projected size of this context's map.

Defined in

src/sdk/components/mapsystem/MapSystemContext.ts:94


projection

Readonly projection: MapProjection

This context's map projection.

Defined in

src/sdk/components/mapsystem/MapSystemContext.ts:93

Methods

getController

getController<K>(key): Controllers[K]

Retrieves a controller from this context.

Type parameters

NameType
Kextends string

Parameters

NameTypeDescription
keyKThe key fo the controller to retrieve.

Returns

Controllers[K]

The controller in this context with the specified key.

Defined in

src/sdk/components/mapsystem/MapSystemContext.ts:113


getLayer

getLayer<K>(key): Layers[K] & MapLayer<MapLayerProps<any>>

Retrieves a layer from this context.

Type parameters

NameType
Kextends string

Parameters

NameTypeDescription
keyKThe key of the layer to retrieve.

Returns

Layers[K] & MapLayer<MapLayerProps<any>>

The layer in this context with the specified key.

Defined in

src/sdk/components/mapsystem/MapSystemContext.ts:104


setController

setController<K>(key, controller): void

Adds a controller to this context.

Type parameters

NameType
Kextends string

Parameters

NameTypeDescription
keyKThe key of the controller to add.
controllerControllers[K]The controller to add.

Returns

void

Defined in

src/sdk/components/mapsystem/MapSystemContext.ts:131


setLayer

setLayer<K>(key, layer): void

Adds a layer to this context.

Type parameters

NameType
Kextends string

Parameters

NameTypeDescription
keyKThe key of the layer to add.
layerLayers[K]The layer to add.

Returns

void

Defined in

src/sdk/components/mapsystem/MapSystemContext.ts:122