# Class: Planning

## vcs.vcm.widgets.planning.Planning

  ##### Fires:

  - `PLANNINGINSTANCES_CHANGED` (vcs.vcm.widgets.planning.Planning) experimental

### Extends

- vcs.vcm.widgets.Widget

### Members

#### active{boolean}

#### className{string}

  class Name of the Object

#### initialized{boolean}

#### name{string}

  unique Name

### Methods

#### addPlanningInstance(name, description, properties){Promise}

  creates a new planning with the Service

  Name | Type | Description
  --- | --- | ---
  `name` | string |
  `description` | string | undefined |
  `properties` | Object | optional properties bag (arbitrary JSON Object)

#### deactivateActivePlanning()

  Deactivates the active planning

#### deletePlanning(planning){Promise}

  Deletes the planning instance

  Name | Type | Description
  --- | --- | ---
  `planning` | vcs.vcm.widgets.planning.PlanningInstance |

#### 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

#### 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

#### setActivePlanning(planningInstance)

  Sets the active planning instance

  Name | Type | Description
  --- | --- | ---
  `planningInstance` | vcs.vcm.widgets.planning.PlanningInstance |

### Type Definitions

#### vcs.vcm.widgets.planning.Planning.Options{vcs.vcm.widgets.Widget.Options}

  ##### Properties:

  Name | Type | Argument | Default | Description
  --- | --- | --- | --- | ---
  `serviceUrl` | string | undefined |  |  |
  `scenarioId` | string |  |  |
  `projectId` | string |  |  |
  `useLocalCRS` | boolean | <optional> | false |
  `showInLegend` | boolean | <optional> | true |
  `legendTitle` | Object | string | undefined |  |  | a translatable object or a string representing the title to use in the legend.
  `commentIcons` | Object | string | undefined |  |  | an object where the key is the type of comment and the value an image src to use as an icon
  `terrainUrl` | string | undefined |  |  | a specific terrain to use for placing vector features onto the terrain in the backend
  `useDefaultTerrain` | boolean | <optional> | true | use the maps terrain for placing vector features onto the terrain
  `allowBalloonEditor` | boolean | <optional> | false | whether to show the balloon editor for feature store layers
  `predefinedBalloons` | Array.<vcs.vcm.widgets.planning.PredefinedBalloon> |  |  | additional predefined balloons
  `showStyleSelector` | boolean | <optional> | false |