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 Parameter | Default type |
|---|---|
Modules extends ModuleRecord | EmptyRecord |
Layers extends LayerRecord | EmptyRecord |
Controllers extends ControllerRecord | EmptyRecord |
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
| Parameter | Type | Description |
|---|---|---|
bus | EventBus | This context's event bus. |
projection | MapProjection | This context's map projection. |
projectedSize | Subscribable<Readonly<Omit<Float64Array<ArrayBufferLike>, "set" | "sort" | "copyWithin">>> | A subscribable which provides the projected size of this context's map. |
deadZone | Subscribable<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
readonlybus:EventBus
Defined in: src/sdk/components/mapsystem/MapSystemContext.ts:92
This context's event bus.
deadZone
readonlydeadZone: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
readonlymodel:MapModel<Modules>
Defined in: src/sdk/components/mapsystem/MapSystemContext.ts:79
This context's map model.
projectedSize
readonlyprojectedSize: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
readonlyprojection: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
| Parameter | Type | Description |
|---|---|---|
key | K | The 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
| Parameter | Type | Description |
|---|---|---|
key | K | The 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
| Parameter | Type | Description |
|---|---|---|
key | K | The key of the controller to add. |
controller | Controllers[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
| Parameter | Type | Description |
|---|---|---|
key | K | The key of the layer to add. |
layer | Layers[K] | The layer to add. |
Returns
void