# Legato.Service.LayerCapabilities

Central Legato LayerCapabilities Service which provides some additional informations for a given layer.

Inherits from: | Legato.Service

Summary

Legato.Service.LayerCapabilities | Central Legato LayerCapabilities Service which provides some additional informations for a given layer.
Functions |
initialize | Basic ctor
getCapabilitites | Gets the capabiltites for given layer.
getLegendUrl | Tries to determine the legendUrl for given layer and executes the callBack method if found.

### Functions

### initialize

> initialize : function( | options | )

Basic ctor

#### Parameters

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

### getCapabilitites

> getCapabilitites: function( | args | )

Gets the capabiltites for given layer. If capabilities could been loaded the onComplete callback method will be executed. All given args will been given back in callback method plus a new key entry ‘result’ where the capabilities result will be stored into.

>     //The followin example shows a valid result
>     onComplete(
>       result: {
>         capabilities: {
>           ...
>         }
>       }
>     )

>     //This is an example if current service is busy
>     onComplete(
>       result: Legato.Service.BUSY
>     )

#### Parameters

args | {Object} A hashmap which contains a layer and a callBack function

#### The following keys are supported

- layer {<OpenLayers.Layer>} The layer from which you want its capabilites
- onComplete - {Function} fired if capabilites are loaded or if service is currently busy

#### See also

Legato.Service.BUSY

### getLegendUrl

> getLegendUrl: function( | args | )

Tries to determine the legendUrl for given layer and executes the callBack method if found.

>     //The followin example shows a valid result
>     onComplete(
>       result: {
>         legendUrl: {
>           ...
>         }
>       }
>     )

>     //This is an example if current service is busy
>     onComplete(
>       result: Legato.Service.BUSY
>     )

#### Parameters

args | {Object} A hashmap which contains a layer and a callBack function

#### The following keys are supported

- layer {<OpenLayers.Layer>} The layer from which you want its capabilites
- onComplete - {Function} fired if capabilites are loaded or if service is currently busy

#### See also

Legato.Service.BUSY

> initialize : function( | options | )

Basic ctor

> getCapabilitites: function( | args | )

Gets the capabiltites for given layer.

> getLegendUrl: function( | args | )

Tries to determine the legendUrl for given layer and executes the callBack method if found.
Abstract base class for all Legato Services
Static const which indicates that the current Legato.Service is busy and that you should try again later.