new CzmlDataSource
A DataSource which processes CZML.
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
name |
String |
<optional> |
An optional name for the data source. This value will be overwritten if a loaded document contains a name. |
Members
-
<static> updaters :Array
-
Gets the array of CZML processing functions.
Methods
-
getChangedEvent
-
Gets an event that will be raised when non-time-varying data changes or if the return value of getIsTimeVarying changes.
Returns:
Event The event. -
getClock
-
Gets the top level clock defined in CZML or the availability of the underlying data if no clock is defined. If the CZML document only contains infinite data, undefined will be returned. If the return value of this function changes, the changed event will be raised.
Returns:
DynamicClock The clock associated with the current CZML data, or undefined if none exists. -
getDynamicObjectCollection
-
Gets the DynamicObjectCollection generated by this data source.
Returns:
DynamicObjectCollection The collection of objects generated by this data source. -
getErrorEvent
-
Gets an event that will be raised if an error is encountered during processing.
Returns:
Event The event. -
getIsTimeVarying
-
Gets a value indicating if the data varies with simulation time. If the return value of this function changes, the changed event will be raised.
Returns:
Boolean True if the data is varies with simulation time, false otherwise. -
getName
-
Gets the name of this data source. If the return value of this function changes, the changed event will be raised.
Returns:
String The name. -
<static> processMaterialPacketData
-
A helper function used by custom CZML updater functions which creates or updates a MaterialProperty from a CZML packet.
Parameters:
Name Type Argument 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.y interval
TimeInterval <optional>
A constraining interval for which the data is valid. sourceUri
String <optional>
The originating uri of the data being processed. Returns:
Boolean True if a new property was created, false otherwise. -
<static> processPacketData
-
A helper function used by custom CZML updater functions which creates or updates a Property from a CZML packet.
Parameters:
Name Type Argument 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.y interval
TimeInterval <optional>
A constraining interval for which the data is valid. sourceUri
String <optional>
The originating uri of the data being processed. Returns:
Boolean True if a new property was created, false otherwise. -
<static> processPositionPacketData
-
A helper function used by custom CZML updater functions which creates or updates a PositionProperty from a CZML packet.
Parameters:
Name Type Argument 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.y interval
TimeInterval <optional>
A constraining interval for which the data is valid. sourceUri
String <optional>
The originating uri of the data being processed. Returns:
Boolean True if a new property was created, false otherwise. -
<static> prototype.load
-
Replaces any existing data with the provided CZML.
Parameters:
Name Type Description czml
Object The CZML to be processed. source
String The source of the CZML. -
<static> prototype.loadUrl
-
Asynchronously loads the CZML at the provided url, replacing any existing data.
Parameters:
Name Type Description url
Object The url to be processed. Returns:
Promise a promise that will resolve when the CZML is processed. -
<static> prototype.process
-
Processes the provided CZML without clearing any existing data.
Parameters:
Name Type Description czml
Object The CZML to be processed. source
String The source of the CZML. -
<static> prototype.processUrl
-
Asynchronously processes the CZML at the provided url without clearing any existing data.
Parameters:
Name Type Description url
Object The url to be processed. Returns:
Promise a promise that will resolve when the CZML is processed.