ToggleButtonViewModel - Cesium Documentation

# ToggleButtonViewModel

#### new ToggleButtonViewModel(command, options)

  A view model which exposes the properties of a toggle button.

  Name | Type | Description
  --- | --- | ---
  `command` | Command | The command which will be executed when the button is toggled.

  `options`

  Object

  optional Object with the following properties:

  Name | Type | Default | Description
  --- | --- | --- | ---
  `toggled` | Boolean | `false` | optional A boolean indicating whether the button should be initially toggled.
  `tooltip` | String | `''` | optional A string containing the button's tooltip.

  Source: Widgets/ToggleButtonViewModel.js, line 26

### Members

#### command :Command

  Gets the command which will be executed when the button is toggled.
  Source: Widgets/ToggleButtonViewModel.js, line 60

#### toggled :Boolean

  Gets or sets whether the button is currently toggled. This property is observable.
  Default Value: `false`
  Source: Widgets/ToggleButtonViewModel.js, line 42

#### tooltip :String

  Gets or sets the button's tooltip. This property is observable.
  Default Value: `''`
  Source: Widgets/ToggleButtonViewModel.js, line 49