# Class: TreeItem

## vcs.vcm.widgets.legend.TreeItem

Abstract base class for tree items representing layers or groups

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

  Name | Type | Description
  --- | --- | ---
  `options` | vcs.vcm.widgets.legend.TreeItem.Options |

### Subclasses

- vcs.vcm.widgets.legend.AbstractGroupItem
- vcs.vcm.widgets.legend.FlightInstanceItem
- vcs.vcm.widgets.legend.GroupLayerItem
- vcs.vcm.widgets.legend.LayerItem
- vcs.vcm.widgets.legend.PluginItem

### Members

#### className{string}

  class Name of the Object

#### id{string}

  The unique id of the given item

#### level{number}

  The nesting level of this tree item

#### titleObject{Object}

  Translateable title object. Where the key represents the local, and the value the translation for example: { en: 'Example', de: 'Beispiel' }

#### visible{boolean}

  Whether the item should be displayed

### Methods

#### activate(active, ignoreViewpoint)

  Activates the tree item

  Name | Type | Description
  --- | --- | ---
  `active` | boolean | the state to activate to, false will deactivate
  `ignoreViewpoint` | boolean | if there is a viewpoint set, it is not activated

#### getViewPoint(){vcs.vcm.util.ViewPoint|null}

  returns the viewpoint for this treeitem

  Deprecated
    - v3.6

#### gotoViewpoint()

  Goes to this tree items viewpoint, if there is one defined

### Type Definitions

#### vcs.vcm.widgets.legend.TreeItem.Options{Object}

  ##### Properties:

  Name | Type | Argument | Default | Description
  --- | --- | --- | --- | ---
  `title` | Object |  |  | the translatable title object, for example: { en: 'Example', de: 'Beispiel' }
  `infoUrl` | string | undefined |  |  | the url to more information
  `infoUrlTarget` | string | undefined |  |  | any link target, including the speciel 'iframe' target, which will open the link as an ifram in the content window
  `viewpointName` | string | undefined |  |  | an optional viewpoint to be activated on click
  `showInLegendIfDisabled` | boolean | <optional> | true |