Type Alias: MapSystemContext<Modules, Layers, Controllers, Context>
MapSystemContext<
Modules,Layers,Controllers,Context> =object&Readonly<Context>
Defined in: src/sdk/components/mapsystem/MapSystemContext.ts:13
A context which holds data related to a compiled MapSystem map.
Type declaration
bus
readonlybus:EventBus
The event bus.
deadZone
readonlydeadZone:Subscribable<ReadonlyFloat64Array>
A subscribable which provides the dead zone of this context's map.
model
readonlymodel:MapModel<Modules>
This context's map model.
projectedSize
readonlyprojectedSize:Subscribable<ReadonlyFloat64Array>
A subscribable which provides the projected size of this context's map.
projection
readonlyprojection:MapProjection
This context's map projection.
getController()
getController<
K>(key):Controllers[K]
Retrieves a controller from this context.
Type Parameters
| Type Parameter |
|---|
K extends string |
Parameters
| Parameter | Type | Description |
|---|---|---|
key | K | The key of the controller to retrieve. |
Returns
Controllers[K]
The controller in this context with the specified key.
getLayer()
getLayer<
K>(key):Layers[K]
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]
The layer in this context with the specified key.
Type Parameters
| Type Parameter | Default type |
|---|---|
Modules extends ModuleRecord | EmptyRecord |
Layers extends LayerRecord | EmptyRecord |
Controllers extends ControllerRecord | EmptyRecord |
Context extends ContextRecord | EmptyRecord |