# CzmlDataSource

#### new Cesium.CzmlDataSource(name)
DataSources/CzmlDataSource.js 1839

  A `DataSource` which processes CZML.

  Name | Type | Description
  --- | --- | ---
  `name` | String | optional An optional name for the data source. This value will be overwritten if a loaded document contains a name.

  ##### Demo:

  - Cesium Sandcastle CZML Demo

### Members

#### staticCesium.CzmlDataSource.updaters : Array
DataSources/CzmlDataSource.js 1977

  Gets the array of CZML processing functions.

#### changedEvent : Event
DataSources/CzmlDataSource.js 1912

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

#### clock : DataSourceClock
DataSources/CzmlDataSource.js 1882

  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.

#### clustering : EntityCluster
DataSources/CzmlDataSource.js 1957

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

#### entities : EntityCollection
DataSources/CzmlDataSource.js 1892

  Gets the collection of `Entity` instances.

#### errorEvent : Event
DataSources/CzmlDataSource.js 1922

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

#### isLoading : Boolean
DataSources/CzmlDataSource.js 1902

  Gets a value indicating if the data source is currently loading data.

#### loadingEvent : Event
DataSources/CzmlDataSource.js 1932

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

#### name : String
DataSources/CzmlDataSource.js 1870

  Gets a human-readable name for this instance.

#### show : Boolean
DataSources/CzmlDataSource.js 1942

  Gets whether or not this data source should be displayed.

### Methods

#### staticCesium.CzmlDataSource.load(data, options) → Promise.<CzmlDataSource>
DataSources/CzmlDataSource.js 1860

  Creates a Promise to a new instance loaded with the provided CZML data.

  Name | Type | Description
  --- | --- | ---
  `data` | String | Object | A url or CZML object to be processed.

  `options`

  Object

  optional An object with the following properties:

  Name | Type | Description
  --- | --- | ---
  `sourceUri` | String | optional Overrides the url to use for resolving relative links.

  ##### Returns:

  A promise that resolves to the new instance once the data is processed.

#### staticCesium.CzmlDataSource.processMaterialPacketData(object, propertyName, packetData, interval, sourceUri, entityCollection)
DataSources/CzmlDataSource.js 2064

  A helper function used by custom CZML updater functions which creates or updates a `MaterialProperty` from a CZML packet.

  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.

#### staticCesium.CzmlDataSource.processPacketData(type, object, propertyName, packetData, interval, sourceUri, entityCollection)
DataSources/CzmlDataSource.js 2036

  A helper function used by custom CZML updater functions which creates or updates a `Property` from a CZML packet.

  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.

#### staticCesium.CzmlDataSource.processPositionPacketData(object, propertyName, packetData, interval, sourceUri, entityCollection)
DataSources/CzmlDataSource.js 2050

  A helper function used by custom CZML updater functions which creates or updates a `PositionProperty` from a CZML packet.

  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.

#### load(czml, options) → Promise.<CzmlDataSource>
DataSources/CzmlDataSource.js 2019

  Loads the provided url or CZML object, replacing any existing data.

  Name | Type | Description
  --- | --- | ---
  `czml` | String | Object | A url or CZML object to be processed.

  `options`

  Object

  optional An object with the following properties:

  Name | Type | Description
  --- | --- | ---
  `sourceUri` | String | optional Overrides the url to use for resolving relative links.

  ##### Returns:

  A promise that resolves to this instances once the data is processed.

#### process(czml, options) → Promise.<CzmlDataSource>
DataSources/CzmlDataSource.js 2007

  Processes the provided url or CZML object without clearing any existing data.

  Name | Type | Description
  --- | --- | ---
  `czml` | String | Object | A url or CZML object to be processed.

  `options`

  Object

  optional An object with the following properties:

  Name | Type | Description
  --- | --- | ---
  `sourceUri` | String | optional Overrides the url to use for resolving relative links.

  ##### Returns:

  A promise that resolves to this instances once the data is processed.