Class: MapModel<M>
A model for maps. Specific functionality is added by adding one or more modules to the model. Each module added to the model is assigned a name which is used to retrieve it from the model.
Type parameters
Name |
---|
M |
Constructors
constructor
• new MapModel<M
>(): MapModel
<M
>
Type parameters
Name |
---|
M |
Returns
MapModel
<M
>
Methods
addModule
▸ addModule<K
>(name
, module
): void
Adds a module to this model.
Type parameters
Name | Type |
---|---|
K | extends string |
Parameters
Name | Type | Description |
---|---|---|
name | K | The name of the module to add. |
module | M [K ] | The module to add. |
Returns
void
Defined in
src/sdk/components/map/MapModel.ts:45
getModule
▸ getModule<K
>(name
): M
[K
]
Gets a module from this model.
Type parameters
Name | Type |
---|---|
K | extends string |
Parameters
Name | Type | Description |
---|---|---|
name | K | The name of the module. |
Returns
M
[K
]
A module.
Defined in
src/sdk/components/map/MapModel.ts:13
▸ getModule<T
>(module
): T
Gets a module instance from the model and assigns it to the provided type.
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
module | (...args : any ) => T | The module to get. |
Returns
T
The requested map data module.
Defined in
src/sdk/components/map/MapModel.ts:21