new AdditionalLayersManager(config)
Manages additional layers that can be added to the map.
Layers that have been added are stored in cookies.
Layers that have been added are stored in cookies.
Parameters:
Name | Type | Description |
---|---|---|
config |
Object | Configuration for this object. The config supplied directly extends the control |
Members
events
Properties:
Name | Type | Description |
---|---|---|
events |
Cadcorp.Util.Events | The events object |
Methods
addLayer(layer, silentnullable)
Adds a user added layer.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
layer |
OpenLayers.Layer.CadcorpWMS | Cadcorp.GeognoSIS8AdditionalFileLayer | The layer add | |
silent |
boolean |
<nullable> |
True to raise added event, ommitted or false to not raise the event |
Fires:
destroy()
Destroys this object
getLayerIndex(layer) → {OpenLayers.Layer.CadcorpWMS|Cadcorp.GeognoSIS8AdditionalFileLayer|null}
Gets the layer at the specified index.
Parameters:
Name | Type | Description |
---|---|---|
layer |
OpenLayers.Layer.CadcorpWMS | Cadcorp.GeognoSIS8AdditionalFileLayer | The layer to search for. |
Returns:
The found layer or null if it isn't in the list.
removeAllLayers()
Removes all user added layers. Fires the layerRemoved event for each layer removed.
Fires:
removeLayer(layer)
Removes the user added layer.
Parameters:
Name | Type | Description |
---|---|---|
layer |
OpenLayers.Layer.CadcorpWMS | Cadcorp.GeognoSIS8AdditionalFileLayer | The layer to remove |
removeLayerAtIndex(index)
Removes the user added layer at the specified index.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The index of the layer to remove |
storeAddedLayers()
Stores all user added layers the cookies.
Only stores the cookies if the user has consented to cookies being used
Events
layerAdded
Layer added event
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
object |
Cadcorp.Util.AdditionalLayersManager | The sender of the event |
layer |
OpenLayers.Layer.CadcorpWMS | Cadcorp.GeognoSIS8AdditionalFileLayer | The layer that was added |
layerRemoved
Layer removed event
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
object |
Cadcorp.Util.AdditionalLayersManager | The sender of the event |
layer |
OpenLayers.Layer.CadcorpWMS | Cadcorp.GeognoSIS8AdditionalFileLayer | The layer that was removed |