# Legato.Control.ToggleLayer

This control switches the visibility of a layer referenced by a Legato layerId.

#### Inherits from

- Legato.Control

Summary

Legato.Control.ToggleLayer | This control switches the visibility of a layer referenced by a Legato layerId.
Functions |
activate | Invoked when the control is activated in toggle mode
deactivate | Invoked when the layer is deactivated in toggle mode
lc:ToggleLayer | XML based config for a Legato.Control.ToggleLayer.
Configurable Properties |
layerId Legato layerId of the layer that will be | shown/hidden.

### Functions

### activate

> activate: function()

Invoked when the control is activated in toggle mode

### deactivate

> deactivate : function()

Invoked when the layer is deactivated in toggle mode

## lc:ToggleLayer

XML based config for a Legato.Control.ToggleLayer.

#### See Also

- Legato.Control
- Legato.Beans.BeanFactory
- <QName>

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

>     <lc:ToggleLayer displayClass="ToggleScaleBarLayer">
>       <layerId>InternalLayer.ScaleBar</layerId>
>     </lc:ToggleLayer>

Summary

Configurable Properties |
layerId Legato layerId of the layer that will be | shown/hidden.

### Configurable Properties

### layerId Legato layerId of the layer that will be

shown/hidden. Note: The Legato layerId is different to the native OpenLayers layer id.

> activate: function()

Invoked when the control is activated in toggle mode

> deactivate : function()

Invoked when the layer is deactivated in toggle mode
This control switches the visibility of a layer referenced by a Legato layerId.
Abstract base class for all Legato control classes