Class: DefaultMapSystemContext<Modules, Layers, Controllers>
An implementation of the base properties in MapSystemContext.
Type parameters
Name | 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
>
Creates an instance of a MapSystemContext.
Type parameters
Name | Type |
---|---|
Modules | extends ModuleRecord = EmptyRecord |
Layers | extends LayerRecord = EmptyRecord |
Controllers | extends ControllerRecord = EmptyRecord |
Parameters
Name | Type | Description |
---|---|---|
bus | EventBus | This context's event bus. |
projection | MapProjection | This context's map projection. |
projectedSize | Subscribable <Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >>> | A subscribable which provides the projected size of this context's map. |
deadZone | Subscribable <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
Name | Type |
---|---|
K | extends string |
Parameters
Name | Type | Description |
---|---|---|
key | K | The 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
Name | Type |
---|---|
K | extends string |
Parameters
Name | 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.
Defined in
src/sdk/components/mapsystem/MapSystemContext.ts:104
setController
▸ setController<K
>(key
, controller
): void
Adds a controller to this context.
Type parameters
Name | Type |
---|---|
K | extends string |
Parameters
Name | Type | Description |
---|---|---|
key | K | The key of the controller to add. |
controller | Controllers [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
Name | Type |
---|---|
K | extends string |
Parameters
Name | Type | Description |
---|---|---|
key | K | The key of the layer to add. |
layer | Layers [K ] | The layer to add. |
Returns
void
Defined in
src/sdk/components/mapsystem/MapSystemContext.ts:122