new DataSourceDisplay(options)
Visualizes a collection of
DataSource
instances.
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Object with the following properties:
Properties
|
- Source:
Members
(static) 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.
Type:
- Source:
dataSources :DataSourceCollection
Gets the collection of data sources to display.
Type:
- Source:
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.
Type:
- Source:
(readonly) ready :Boolean
Gets a value indicating whether or not all entities in the data source are ready
Type:
- Boolean
- Source:
scene :Scene
Gets the scene associated with this display.
Type:
- Source:
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
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.
Throws:
-
This object was destroyed, i.e., destroy() was called.
- Type
- DeveloperError
Returns:
- Type
- undefined
Example
dataSourceDisplay = dataSourceDisplay.destroy();
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
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.
- Type
- Boolean
update(time) → {Boolean}
Updates the display to the provided time.
Parameters:
Name | Type | Description |
---|---|---|
time |
JulianDate | The simulation time. |
- Source:
Returns:
True if all data sources are ready to be displayed, false otherwise.
- Type
- Boolean
Type Definitions
VisualizersCallback(scene, dataSource) → {Array.<Visualizer>}
A function which creates an array of visualizers used for visualization.
Parameters:
Name | Type | Description |
---|---|---|
scene |
Scene | The scene to create visualizers for. |
dataSource |
DataSource | The data source to create visualizers for. |
- Source:
Returns:
An array of visualizers used for visualization.
- Type
- Array.<Visualizer>
Example
function createVisualizers(scene, dataSource) {
return [new Cesium.BillboardVisualizer(scene, dataSource.entities)];
}