Class: CzmlDataSource

CzmlDataSource

new CzmlDataSource(nameopt)

A DataSource which processes CZML.
Parameters:
Name Type Attributes Description
name String <optional>
An optional name for the data source. This value will be overwritten if a loaded document contains a name.
Source:

Members

(static) updaters :Array

Gets the array of CZML processing functions.
Type:
  • Array
Source:

changedEvent :Event

Gets an event that will be raised when the underlying data changes.
Type:
Source:

clock :DataSourceClock

Gets the clock settings defined by the loaded CZML. If no clock is explicitly defined in the CZML, the combined availability of all objects is returned. If only static data exists, this value is undefined.
Type:
Source:

clustering :EntityCluster

Gets or sets the clustering options for this data source. This object can be shared between multiple data sources.
Type:
Source:

entities :EntityCollection

Gets the collection of Entity instances.
Type:
Source:

errorEvent :Event

Gets an event that will be raised if an error is encountered during processing.
Type:
Source:

isLoading :Boolean

Gets a value indicating if the data source is currently loading data.
Type:
  • Boolean
Source:

loadingEvent :Event

Gets an event that will be raised when the data source either starts or stops loading.
Type:
Source:

name :String

Gets a human-readable name for this instance.
Type:
  • String
Source:

show :Boolean

Gets whether or not this data source should be displayed.
Type:
  • Boolean
Source:

Methods

(static) load(data, optionsopt) → {Promise.<CzmlDataSource>}

Creates a Promise to a new instance loaded with the provided CZML data.
Parameters:
Name Type Attributes Description
data String | Object A url or CZML object to be processed.
options Object <optional>
An object with the following properties:
Properties
Name Type Attributes Description
sourceUri String <optional>
Overrides the url to use for resolving relative links.
Source:
Returns:
A promise that resolves to the new instance once the data is processed.
Type
Promise.<CzmlDataSource>

(static) processMaterialPacketData(object, propertyName, packetData, interval, sourceUri, entityCollection)

A helper function used by custom CZML updater functions which creates or updates a MaterialProperty from a CZML packet.
Parameters:
Name Type Description
object Object The object on which the property will be added or updated.
propertyName String The name of the property on the object.
packetData Object The CZML packet being processed.
interval TimeInterval A constraining interval for which the data is valid.
sourceUri String The originating uri of the data being processed.
entityCollection EntityCollection The collection being processsed.
Source:

(static) processPacketData(type, object, propertyName, packetData, interval, sourceUri, entityCollection)

A helper function used by custom CZML updater functions which creates or updates a Property from a CZML packet.
Parameters:
Name Type Description
type function The constructor function for the property being processed.
object Object The object on which the property will be added or updated.
propertyName String The name of the property on the object.
packetData Object The CZML packet being processed.
interval TimeInterval A constraining interval for which the data is valid.
sourceUri String The originating uri of the data being processed.
entityCollection EntityCollection The collection being processsed.
Source:

(static) processPositionPacketData(object, propertyName, packetData, interval, sourceUri, entityCollection)

A helper function used by custom CZML updater functions which creates or updates a PositionProperty from a CZML packet.
Parameters:
Name Type Description
object Object The object on which the property will be added or updated.
propertyName String The name of the property on the object.
packetData Object The CZML packet being processed.
interval TimeInterval A constraining interval for which the data is valid.
sourceUri String The originating uri of the data being processed.
entityCollection EntityCollection The collection being processsed.
Source:

load(czml, optionsopt) → {Promise.<CzmlDataSource>}

Loads the provided url or CZML object, replacing any existing data.
Parameters:
Name Type Attributes Description
czml String | Object A url or CZML object to be processed.
options Object <optional>
An object with the following properties:
Properties
Name Type Attributes Description
sourceUri String <optional>
Overrides the url to use for resolving relative links.
Source:
Returns:
A promise that resolves to this instances once the data is processed.
Type
Promise.<CzmlDataSource>

process(czml, optionsopt) → {Promise.<CzmlDataSource>}

Processes the provided url or CZML object without clearing any existing data.
Parameters:
Name Type Attributes Description
czml String | Object A url or CZML object to be processed.
options Object <optional>
An object with the following properties:
Properties
Name Type Attributes Description
sourceUri String <optional>
Overrides the url to use for resolving relative links.
Source:
Returns:
A promise that resolves to this instances once the data is processed.
Type
Promise.<CzmlDataSource>