# Legato.Control.LayersValueProvider

ValueProvider which gives you the possibility to be notified about every change of all current used <OpenLayers.Layer> instances inside the <OpenLayers.Map>.

You can watch a defined property of all <OpenLayers.Layer> instances. All layer values will be given back by a comma seperated list.

Inherits from: | Legato.Control

Summary

Legato.Control.LayersValueProvider | ValueProvider which gives you the possibility to be notified about every change of all current used <OpenLayers.Layer> instances inside the <OpenLayers.Map>.
Functions |
initialize | Basic ctor
destroy | <OpenLayer.Control>
setMap | <OpenLayer.Control>
draw | <OpenLayer.Control>
lc:LayersValueProvider | XML based config for a Legato.Control.LayersValueProvider.
Properties |
QName | The qualified name for this control.
layerListVisible | Defines the {DOMElement} id where all visible <OpenLayers.Layer> names should be written into.
layerListInvisible | Defines the {DOMElement} id where all invisible <OpenLayers.Layer> names should be written into.

### Functions

### initialize

> initialize : function( | options | )

Basic ctor

#### Parameters

options | {Object} A Hashmap containing option parameters for this control The following keys are supported

- target {object} an object which wants to observe,
- property{function|String} the propety or function which should be used for providing the observed value
- layerValue {String} any Property name of an <OpenLayers.Layer> instance
- layerVisible {Boolean} true = only watch visible layers, false = only watch invisible layers. Default is true.

### destroy

> destroy : function()

#### See Also

<OpenLayer.Control>

### setMap

> setMap : function( | map | )

#### See Also

<OpenLayer.Control>

### draw

> draw : function()

#### See Also

<OpenLayer.Control>

## lc:LayersValueProvider

XML based config for a Legato.Control.LayersValueProvider.

#### See Also

- Legato.Control
- Legato.Beans.BeanFactory
- QName

#### A valid config example for a LayersValueProvider would be

>     <lc:LayersValueProvider layerList="layerList" layerListVisible="layerListVisible" layerListInvisible="layerListInvisible"/>

Summary

Properties |
QName | The qualified name for this control.
layerListVisible | Defines the {DOMElement} id where all visible <OpenLayers.Layer> names should be written into.
layerListInvisible | Defines the {DOMElement} id where all invisible <OpenLayers.Layer> names should be written into.

### Properties

### QName

The qualified name for this control. Needed by XML config to instantiate it.

### layerListVisible

Defines the {DOMElement} id where all visible <OpenLayers.Layer> names should be written into. The DOMElement must exists in current DOM. Otherwise an Exception is thrown.

### layerListInvisible

Defines the {DOMElement} id where all invisible <OpenLayers.Layer> names should be written into. The DOMElement must exists in current DOM. Otherwise an Exception is thrown.

> initialize : function( | options | )

Basic ctor

> destroy : function()

OpenLayer.Control

> setMap : function( | map | )

OpenLayer.Control

> draw : function()

OpenLayer.Control
ValueProvider which gives you the possibility to be notified about every change of all current used OpenLayers.Layer instances inside the OpenLayers.Map.
Abstract base class for all Legato control classes
The qualified name for this control.