ProviderViewModel - Cesium Documentation

# ProviderViewModel

#### new ProviderViewModel(options)

  A view model that represents each item in the `BaseLayerPicker`.

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

  `options`

  Object

  The object containing all parameters.

  Name | Type | Description
  --- | --- | ---
  `name` | String | The name of the layer.
  `tooltip` | String | The tooltip to show when the item is moused over.
  `iconUrl` | String | An icon representing the layer.
  `creationFunction` | ProviderViewModel~CreationFunction | Command | A function or Command that creates one or more providers which will be added to the globe when this item is selected.

  ##### See:

  - BaseLayerPicker
  - ImageryProvider
  - TerrainProvider
  Source: Widgets/BaseLayerPicker/ProviderViewModel.js, line 33

### Members

#### creationCommand :Command

  Gets the Command that creates one or more providers which will be added to the globe when this item is selected.
  Source: Widgets/BaseLayerPicker/ProviderViewModel.js, line 85

#### iconUrl :String

  Gets the icon. This property is observable.
  Source: Widgets/BaseLayerPicker/ProviderViewModel.js, line 72

#### name :String

  Gets the display name. This property is observable.
  Source: Widgets/BaseLayerPicker/ProviderViewModel.js, line 60

#### tooltip :String

  Gets the tooltip. This property is observable.
  Source: Widgets/BaseLayerPicker/ProviderViewModel.js, line 66

### Type Definitions

#### CreationFunction() → ImageryProvider|TerrainProvider|Array.<ImageryProvider>|Array.<TerrainProvider>

  A function which creates one or more providers.

  ##### Returns:

  The ImageryProvider or TerrainProvider, or array of providers, to be added to the globe.
  Source: Widgets/BaseLayerPicker/ProviderViewModel.js, line 92