# Legato.Control.Legend.Plugin.LayerFunction

Legend Plugin wich gives you the control over the associated layer by configuring this plugin with a custom javascript function.

Summary

Legato.Control.Legend.Plugin.LayerFunction | Legend Plugin wich gives you the control over the associated layer by configuring this plugin with a custom javascript function.
Functions |
afterInitialized | Validates that this instance has been configured right.
afterSetup | Register the onclick event handler
beforeDestroy | Destroys the created plugin div.
onclick | Triggered if users clicks the plugin div
Legato.Control.Legend.Plugin.LayerFunction.Factory | Factory class wich is able to create a Legato.Control.Legend.Plugin.LayerFunction instance.
Functions |
create | Factory method for creating a Legato.Control.Legend.Plugin.LayerFunction instance.
lpp:LayerFunction | XML based config for Legato.Control.Legend.Plugin.LayerFunction.
Properties |
QName | The qualified name for this control.

### Functions

### afterInitialized

> afterInitialized : function()

Validates that this instance has been configured right. Throws exception if not.

### afterSetup

> afterSetup : function()

Register the onclick event handler

### beforeDestroy

> beforeDestroy : function()

Destroys the created plugin div.

### onclick

> onclick : function( | event | )

Triggered if users clicks the plugin div

## Legato.Control.Legend.Plugin.LayerFunction.Factory

Factory class wich is able to create a Legato.Control.Legend.Plugin.LayerFunction instance.

Summary

Functions |
create | Factory method for creating a Legato.Control.Legend.Plugin.LayerFunction instance.

### Functions

### create

> create : function( | layer | )

Factory method for creating a Legato.Control.Legend.Plugin.LayerFunction instance.

## lpp:LayerFunction

XML based config for Legato.Control.Legend.Plugin.LayerFunction. If configured this plugin renders a div with a configurable css class. If clicked the associated layer will been passed to configured js callback.

#### See Also

- Legato.Control.Legend.Plugin
- Legato.Beans.BeanFactory
- QName

#### A valid config example for a LayerLegend Plugin would be

>     <llp:LayerFunction>
>       <callback><lb:Reference target="callbackBean" /></callback>
>       <displayClass>Foo</displayClass>
>     </llp:LayerFunction>

Summary

Properties |
QName | The qualified name for this control.

### Properties

### QName

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

> afterInitialized : function()

Validates that this instance has been configured right.

> afterSetup : function()

Register the onclick event handler

> beforeDestroy : function()

Destroys the created plugin div.

> onclick : function( | event | )

Triggered if users clicks the plugin div
Legend Plugin wich gives you the control over the associated layer by configuring this plugin with a custom javascript function.

> create : function( | layer | )

Factory method for creating a Legato.Control.Legend.Plugin.LayerFunction instance.
Abstract base class for all Legato.Legend.Plugin subclasses.
The qualified name for this control.