LeafletDataSourceDisplay

LeafletDataSourceDisplay

new LeafletDataSourceDisplay(options)

Source:

Visualizes a collection of DataSource instances in Leaflet.

Parameters:
Name Type Description
options Object

Object with the following properties:

Properties
Name Type Attributes Default Description
scene Scene

The scene in which to display the data.

dataSourceCollection DataSourceCollection

The data sources to display.

visualizersCallback LeafletDataSourceDisplay~VisualizersCallback <optional>
LeafletDataSourceDisplay.defaultVisualizersCallback

A function which creates an array of visualizers used for visualization. If undefined, all standard visualizers are used.

Members

dataSources :DataSourceCollection

Source:

Gets the collection of data sources to display.

Type:
  • DataSourceCollection

defaultDataSource :CustomDataSource

Source:

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:

(readonly) ready :Boolean

Source:

Gets a value indicating whether or not all entities in the data source are ready

Type:
  • Boolean

scene :LeafletScene

Source:

Gets the scene associated with this display.

Type:
  • LeafletScene

Methods

(static) defaultVisualizersCallback()

Source:

Gets or sets the default function which creates an array of visualizers used for visualization. By default, this function uses all standard visualizers.

destroy()

Source:
See:
  • DataSourceDisplay#isDestroyed

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.

Example
LeafletDataSourceDisplay = dataSourceDisplay.destroy();
Throws:

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

Type
DeveloperError

getLatLngBounds(dataSource) → {LatLngBounds}

Source:

Computes the rectangular bounds which encloses the visualization produced for the given entities.

Parameters:
Name Type Description
dataSource DataSource

The data source whose bounds to compute.

Returns:

The computed bounds.

Type
LatLngBounds

isDestroyed() → {Boolean}

Source:
See:

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.

Type
Boolean

update(time) → {Boolean}

Source:

Updates the display to the provided time.

Parameters:
Name Type Description
time JulianDate

The simulation time.

Returns:

True if all data sources are ready to be displayed, false otherwise.

Type
Boolean

Type Definitions

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

Source:

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

Example
function createVisualizers(scene, dataSource) {
    return [new Cesium.BillboardVisualizer(scene, dataSource.entities)];
}
Parameters:
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.

Type
Array.<Visualizer>