# Class: Legend

## vcs.vcm.widgets.legend.Legend

#### new vcs.vcm.widgets.legend.Legend(options)

  Name | Type | Description
  --- | --- | ---
  `options` | Object |

  ##### Fires:

  - `LEGEND_INITIALIZED` (vcs.vcm.widgets.legend.Legend) - An event called explicitly, when the legend has been initialized

### Extends

- vcs.vcm.widgets.Widget

### Members

#### active{boolean}

#### className{string}

  class Name of the Object

#### cluster{Array.<vcs.vcm.widgets.legend.ClusterItem>}

  The top-level clusters

#### initialized{boolean}

#### name{string}

  unique Name

### Methods

#### getClassName(){string} inherited

  returns the class name of this object.

  Deprecated
    - Yes

  ##### Returns:

  className

#### getConfigObject(){Object} inherited

#### getId(){string} inherited

  returns the id of this object

  Deprecated
    - Yes

#### getLayerTitle(layerName){string|Object|null}

  Gets the title object associated with a layer, should the layer have one

  Name | Type | Description
  --- | --- | ---
  `layerName` | string |

#### getName(){string} inherited

  returns the name of the Object, the name is either given by the config Object or a uuid is generated

  Deprecated
    - Yes

#### getSupportedMaps(){Array.<string>} inherited

  Returns the widgets supported maps

#### isActive(){boolean} inherited

  returns the active state of the widget

  Deprecated
    - v3.6 use the property active directly

  ##### Returns:

  state of the widget

#### isInitialized(){boolean} inherited

  checks if the Widget is already initialized

  Deprecated
    - Yes

  ##### Returns:

  true if all requirements are there

#### isSupported(map){boolean} inherited

  returns true if this widget supports the given map. Should be overriden by the widget

  Name | Type | Description
  --- | --- | ---
  `map` | string | vcs.vcm.maps.Map | the map or className to check for support

#### resetLayer()

  resets all layer to the default state

### Events

#### LEGEND_INITIALIZED

  An event called explicitly, when the legend has been initialized

  Deprecated
    - 3.5