CzmlDataSource

new Cesium.CzmlDataSource(name)

A DataSource which processes CZML.
参数名称 类型 描述信息
name string 可选 An optional name for the data source. This value will be overwritten if a loaded document contains a name.
Demo:

成员(属性)

Gets the array of CZML processing functions.
Gets an event that will be raised when the underlying data changes.
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.
Gets or sets the clustering options for this data source. This object can be shared between multiple data sources.
Gets the credit that will be displayed for the data source
Gets the collection of Entity instances.
Gets an event that will be raised if an error is encountered during processing.
Gets a value indicating if the data source is currently loading data.
Gets an event that will be raised when the data source either starts or stops loading.
Gets a human-readable name for this instance.
Gets whether or not this data source should be displayed.

方法

static Cesium.CzmlDataSource.load(czml, options)Promise.<CzmlDataSource>

Creates a Promise to a new instance loaded with the provided CZML data.
参数名称 类型 描述信息
czml Resource | string | object A url or CZML object to be processed.
options CzmlDataSource.LoadOptions 可选 An object specifying configuration options
返回值:
A promise that resolves to the new instance once the data is processed.

static Cesium.CzmlDataSource.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.
参数名称 类型 描述信息
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.

static Cesium.CzmlDataSource.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.
参数名称 类型 描述信息
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.

static Cesium.CzmlDataSource.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.
参数名称 类型 描述信息
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.
Loads the provided url or CZML object, replacing any existing data.
参数名称 类型 描述信息
czml Resource | string | object A url or CZML object to be processed.
options CzmlDataSource.LoadOptions 可选 An object specifying configuration options
返回值:
A promise that resolves to this instances once the data is processed.
Processes the provided url or CZML object without clearing any existing data.
参数名称 类型 描述信息
czml Resource | string | object A url or CZML object to be processed.
options CzmlDataSource.LoadOptions 可选 An object specifying configuration options
返回值:
A promise that resolves to this instances once the data is processed.
Updates the data source to the provided time. This function is optional and is not required to be implemented. It is provided for data sources which retrieve data based on the current animation time or scene state. If implemented, update will be called by DataSourceDisplay once a frame.
参数名称 类型 描述信息
time JulianDate The simulation time.
返回值:
True if this data source is ready to be displayed at the provided time, false otherwise.

定义的类型

Cesium.CzmlDataSource.LoadOptions

Initialization options for the load method.
属性:
属性名称 类型 可选 描述信息
sourceUri Resource | string <可选>
Overrides the url to use for resolving relative links.
credit Credit | string <可选>
A credit for the data source, which is displayed on the canvas.

Cesium.CzmlDataSource.UpdaterFunction(entity, packet, entityCollection, sourceUri)

参数名称 类型 描述信息
entity Entity
packet object
entityCollection EntityCollection
sourceUri string