Constructor
new LayerManager()
Creates an empty LayerManager instance to which Layers can be added
using a maps-project configuration or manually using the
method addLayer.
- Source:
Methods
addLayer(layer)
Add an existing Layer to the LayerManager
Parameters:
Name | Type | Description |
---|---|---|
layer |
Object |
- Source:
dispose()
Clear LayerManager and dispose layers
- Source:
forEach(callback)
Iterate over each layer inside the LayerManager
Parameters:
Name | Type | Description |
---|---|---|
callback |
function |
- Source:
getActiveFilter() → {Array.<object>}
Get selected FilterLayers
- Source:
Returns:
filters
- Type
- Array.<object>
getLayerById(id)
Method that returns a layer from LayerManager based on UniqueId provided
Parameters:
Name | Type | Description |
---|---|---|
id |
string |
- Source:
loadLayers(layers, cache) → {Promise}
Add layer to the LayerManager using a syntax that is
compatible to the Layer's constructor.
Parameters:
Name | Type | Description |
---|---|---|
layers |
Array.<object> | layer configs |
cache |
Array.<object> | cached layer configs |
- Source:
Returns:
resolved layers
- Type
- Promise
reloadAllServiceMetadata(url, type)
Reloads the metadata of all layers
Parameters:
Name | Type | Description |
---|---|---|
url |
string | |
type |
string |
- Source:
reloadServiceMetadata(url, type)
Reloads the metadata of all layers from the given service identified by url and type
Parameters:
Name | Type | Description |
---|---|---|
url |
string | |
type |
string |
- Source:
(async) resolveCatalogLayers_(layers) → {Promise.<Object>}
Resolves catalog layers by their IDs.
This function takes an object of layers, extracts the catalog IDs from the layers,
and fetches the corresponding layers from the catalog using the IndexBinder.
Parameters:
Name | Type | Description |
---|---|---|
layers |
Object | An object containing layer information. |
- Source:
Returns:
A promise that resolves to an object containing the fetched layers.
- Type
- Promise.<Object>