Skip to main content

Class: DefaultMapSystemContext<Modules, Layers, Controllers>

Defined in: src/sdk/components/mapsystem/MapSystemContext.ts:72

An implementation of the base properties in MapSystemContext.

Type Parameters​

Type ParameterDefault type
Modules extends ModuleRecordEmptyRecord
Layers extends LayerRecordEmptyRecord
Controllers extends ControllerRecordEmptyRecord

Constructors​

Constructor​

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

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

Creates an instance of a MapSystemContext.

Parameters​

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

Returns​

DefaultMapSystemContext<Modules, Layers, Controllers>

Properties​

bus​

readonly bus: EventBus

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

This context's event bus.


deadZone​

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

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

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


model​

readonly model: MapModel<Modules>

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

This context's map model.


projectedSize​

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

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

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


projection​

readonly projection: MapProjection

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

This context's map projection.

Methods​

getController()​

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

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

Retrieves a controller from this context.

Type Parameters​

Type Parameter
K extends string

Parameters​

ParameterTypeDescription
keyKThe key fo the controller to retrieve.

Returns​

Controllers[K]

The controller in this context with the specified key.


getLayer()​

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

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

Retrieves a layer from this context.

Type Parameters​

Type Parameter
K extends string

Parameters​

ParameterTypeDescription
keyKThe key of the layer to retrieve.

Returns​

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

The layer in this context with the specified key.


setController()​

setController<K>(key, controller): void

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

Adds a controller to this context.

Type Parameters​

Type Parameter
K extends string

Parameters​

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

Returns​

void


setLayer()​

setLayer<K>(key, layer): void

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

Adds a layer to this context.

Type Parameters​

Type Parameter
K extends string

Parameters​

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

Returns​

void