BaseLayerPickerViewModel - Cesium Documentation

# BaseLayerPickerViewModel

#### new BaseLayerPickerViewModel(options)

  The view model for `BaseLayerPicker`.

  Name | Type | Description
  --- | --- | ---

  `options`

  Object

  Object with the following properties:

  Name | Type | Default | Description
  --- | --- | --- | ---
  `globe` | Globe |  | The Globe to use.
  `imageryProviderViewModels` | Array.<ProviderViewModel> | `[]` | optional The array of ProviderViewModel instances to use for imagery.
  `selectedImageryProviderViewModel` | ProviderViewModel |  | optional The view model for the current base imagery layer, if not supplied the first available imagery layer is used.
  `terrainProviderViewModels` | Array.<ProviderViewModel> | `[]` | optional The array of ProviderViewModel instances to use for terrain.
  `selectedTerrainProviderViewModel` | ProviderViewModel |  | optional The view model for the current base terrain layer, if not supplied the first available terrain layer is used.

  ##### Throws:

  - DeveloperError : imageryProviderViewModels must be an array.
  - DeveloperError : terrainProviderViewModels must be an array.
  Source: Widgets/BaseLayerPicker/BaseLayerPickerViewModel.js, line 37

### Members

#### buttonImageUrl :String

  Gets the button background image. This property is observable.
  Source: Widgets/BaseLayerPicker/BaseLayerPickerViewModel.js, line 99

#### buttonTooltip :String

  Gets the button tooltip. This property is observable.
  Source: Widgets/BaseLayerPicker/BaseLayerPickerViewModel.js, line 79

#### dropDownVisible :Boolean

  Gets or sets whether the imagery selection drop-down is currently visible.
  Default Value: `false`
  Source: Widgets/BaseLayerPicker/BaseLayerPickerViewModel.js, line 71

#### globe :Globe

  Gets the globe.
  Source: Widgets/BaseLayerPicker/BaseLayerPickerViewModel.js, line 215

#### imageryProviderViewModels :Array.<ProviderViewModel>

  Gets or sets an array of ProviderViewModel instances available for imagery selection. This property is observable.
  Source: Widgets/BaseLayerPicker/BaseLayerPickerViewModel.js, line 57

#### selectedImagery :ProviderViewModel

  Gets or sets the currently selected imagery. This property is observable.
  Default Value: `undefined`
  Source: Widgets/BaseLayerPicker/BaseLayerPickerViewModel.js, line 110

#### selectedTerrain :ProviderViewModel

  Gets or sets the currently selected terrain. This property is observable.
  Default Value: `undefined`
  Source: Widgets/BaseLayerPicker/BaseLayerPickerViewModel.js, line 162

#### terrainProviderViewModels :Array.<ProviderViewModel>

  Gets or sets an array of ProviderViewModel instances available for terrain selection. This property is observable.
  Source: Widgets/BaseLayerPicker/BaseLayerPickerViewModel.js, line 64

#### toggleDropDown :Command

  Gets the command to toggle the visibility of the drop down.
  Source: Widgets/BaseLayerPicker/BaseLayerPickerViewModel.js, line 203