DataSourceDisplay - Cesium Documentation

# DataSourceDisplay

#### new DataSourceDisplay(options)

  Visualizes a collection of `DataSource` instances.

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

  `options`

  Object

  Object with the following properties:

  Name | Type | Default | Description
  --- | --- | --- | ---
  `scene` | Scene |  | The scene in which to display the data.
  `dataSourceCollection` | DataSourceCollection |  | The data sources to display.
  `visualizersCallback` | DataSourceDisplay~VisualizersCallback | `DataSourceDisplay.defaultVisualizersCallback` | optional A function which creates an array of visualizers used for visualization. If undefined, all standard visualizers are used.

  Source: DataSources/DataSourceDisplay.js, line 68

### Members

#### staticDataSourceDisplay.defaultVisualizersCallback :DataSourceDisplay~VisualizersCallback

  Gets or sets the default function which creates an array of visualizers used for visualization. By default, this function uses all standard visualizers.
  Source: DataSources/DataSourceDisplay.js, line 108

#### dataSources :DataSourceCollection

  Gets the collection of data sources to display.
  Source: DataSources/DataSourceDisplay.js, line 143

#### defaultDataSource :CustomDataSource

  Gets the default data source instance which can be used to manually create and visualize entities not tied to a specific data source. This instance is always available and does not appear in the list dataSources collection.
  Source: DataSources/DataSourceDisplay.js, line 156

#### scene :Scene

  Gets the scene associated with this display.
  Source: DataSources/DataSourceDisplay.js, line 133

### Methods

#### destroy() → undefined

  Destroys the WebGL resources held by this object. Destroying an object allows for deterministic release of WebGL resources, instead of relying on the garbage collector to destroy this object.
  Once an object is destroyed, it should not be used; calling any function other than `isDestroyed` will result in a `DeveloperError` exception. Therefore, assign the return value (`undefined`) to the object as done in the example.

  ##### Returns:

  ##### Throws:

  - DeveloperError : This object was destroyed, i.e., destroy() was called.

  ##### Example:

      dataSourceDisplay = dataSourceDisplay.destroy();

  ##### See:

  - DataSourceDisplay#isDestroyed
  Source: DataSources/DataSourceDisplay.js, line 194

#### isDestroyed() → Boolean

  Returns true if this object was destroyed; otherwise, false.
  If this object was destroyed, it should not be used; calling any function other than `isDestroyed` will result in a `DeveloperError` exception.

  ##### Returns:

  True if this object was destroyed; otherwise, false.

  ##### See:

  - DataSourceDisplay#destroy
  Source: DataSources/DataSourceDisplay.js, line 173

#### update(time) → Boolean

  Updates the display to the provided time.

  Name | Type | Description
  --- | --- | ---
  `time` | JulianDate | The simulation time.

  ##### Returns:

  True if all data sources are ready to be displayed, false otherwise.
  Source: DataSources/DataSourceDisplay.js, line 212

### Type Definitions

#### VisualizersCallback(scene, dataSource) → Array.<Visualizer>

  A function which creates an array of visualizers used for visualization.

  Name | Type | Description
  --- | --- | ---
  `scene` | Scene | The scene to create visualizers for.
  `dataSource` | DataSource | The data source to create visualizers for.

  ##### Returns:

  An array of visualizers used for visualization.

  ##### Example:

      function createVisualizers(scene, dataSource) {
          return [new BillboardVisualizer(scene, dataSource.entities)];
      }

  Source: DataSources/DataSourceDisplay.js, line 344