# ControlFunction

Inherits from: | Legato.Control

Summary

ControlFunction |
Properties |
type | {OpenLayers.Control.TYPE}
Functions |
Legato.Control.ControlFunction | Create a new control function control displayed as a button.
trigger | Invoked when the control is clicked
lc:ControlFunction | XML based config for a <Legato.Control.ControlFunction>.
Properties |
QName | The qualified name for this control.

### Properties

### type

{OpenLayers.Control.TYPE}

### Functions

### Legato.Control.ControlFunction

Create a new control function control displayed as a button. If clicked the given callback method will been executed and the current map will been passed as argument.

#### Parameters

options | {Object} A Hashmap containing option parameters for this control

The following keys are supported for an observer element

- callback {function} the callback method wich will been executed if control has been clicked

### trigger

> trigger : function()

Invoked when the control is clicked

## lc:ControlFunction

XML based config for a <Legato.Control.ControlFunction>.

#### See Also

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

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

>     <lc:ControlFunction />

Summary

Properties |
QName | The qualified name for this control.

### Properties

### QName

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

> trigger : function()

Invoked when the control is clicked
Abstract base class for all Legato control classes
The qualified name for this control.