DataSourceDisplay

new Cesium.DataSourceDisplay(options)

Visualizes a collection of DataSource instances.
参数名称 类型 描述信息
options object Object with the following properties:
参数名称 类型 默认值 描述信息
scene Scene The scene in which to display the data.
dataSourceCollection DataSourceCollection The data sources to display.
visualizersCallback DataSourceDisplay.VisualizersCallback DataSourceDisplay.defaultVisualizersCallback 可选 A function which creates an array of visualizers used for visualization. If undefined, all standard visualizers are used.

成员(属性)

Gets the collection of data sources to display.
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.
Gets a value indicating whether or not all entities in the data source are ready
Gets the scene associated with this display.

方法

static Cesium.DataSourceDisplay.defaultVisualizersCallback()

Gets or sets the default function which creates an array of visualizers used for visualization. By default, this function uses all standard visualizers.
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.
Throws:
  • DeveloperError : This object was destroyed, i.e., destroy() was called.
使用示例:
dataSourceDisplay = dataSourceDisplay.destroy();
参考:
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.
返回值:
True if this object was destroyed; otherwise, false.
参考:
Updates the display to the provided time.
参数名称 类型 描述信息
time JulianDate The simulation time.
返回值:
True if all data sources are ready to be displayed, false otherwise.

定义的类型

Cesium.DataSourceDisplay.VisualizersCallback(scene, entityCluster, dataSource)Array.<Visualizer>

A function which creates an array of visualizers used for visualization.
参数名称 类型 描述信息
scene Scene The scene to create visualizers for.
entityCluster EntityCluster The entity cluster to create visualizers for.
dataSource DataSource The data source to create visualizers for.
返回值:
An array of visualizers used for visualization.
使用示例:
function createVisualizers(scene, entityCluster, dataSource) {
    return [new Cesium.BillboardVisualizer(entityCluster, dataSource.entities)];
}