new Cesium.CzmlDataSource(name)

A DataSource which processes CZML.
Name Type Description
name string optional 数据源的可选名称 。 如果装入的文档包含名称, 此值将被覆盖 .
Demo:

Members

static Cesium.CzmlDataSource.updaters : Array.<CzmlDataSource.UpdaterFunction>

获得 NT 0 处理函数的数组.

changedEvent : Event

获得一个在基础数据变化时会提升的事件.

clock : DataSourceClock

获得已装入的 NT % 0 定义的时钟设置 。 如果没有明确时钟 定义于 NT 0 ,返回所有对象的综合可用性。 若为 只有静态数据存在,此值未定义 .

clustering : EntityCluster

获取或设置此数据源的分组选项。 此对象可以在多个数据源之间共享.

credit : Credit

获取数据源将显示的信用

entities : EntityCollection

Gets the collection of Entity instances.

errorEvent : Event

获得一个在处理过程中遇到错误时会提起的事件.

isLoading : boolean

获得一个表示数据源是否正在装入数据的值.

loadingEvent : Event

获得数据源开始或停止加载时将提出的事件.

name : string

为这个例子获得一个人可读的名字.

show : boolean

获取是否显示此数据源 .

Methods

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

Creates a Promise to a new instance loaded with the provided CZML data.
Name Type Description
czml Resource | string | object Url 或 CZML 对象待处理.
options CzmlDataSource.LoadOptions optional 指定配置选项的对象
Returns:
一旦数据得到处理,就能解决新问题的承诺.

static Cesium.CzmlDataSource.processMaterialPacketData(object, propertyName, packetData, interval, sourceUri, entityCollection)

自定义 NT 0 更新器函数所使用的辅助函数 which creates or updates a MaterialProperty from a CZML packet.
Name Type Description
object object 将添加或更新财产的对象.
propertyName string 物体上的财产名称.
packetData object The CZML packet being processed.
interval TimeInterval 数据有效的约束间隔 .
sourceUri string 正在处理的数据的原始内容.
entityCollection EntityCollection 正在处理收藏.

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

自定义 NT 0 更新器函数所使用的辅助函数 which creates or updates a Property from a CZML packet.
Name Type Description
type function 正在处理的财产的构造器功能 .
object object 将添加或更新财产的对象.
propertyName string 物体上的财产名称.
packetData object The CZML packet being processed.
interval TimeInterval 数据有效的约束间隔 .
sourceUri string 正在处理的数据的原始内容.
entityCollection EntityCollection 正在处理收藏.

static Cesium.CzmlDataSource.processPositionPacketData(object, propertyName, packetData, interval, sourceUri, entityCollection)

自定义 NT 0 更新器函数所使用的辅助函数 which creates or updates a PositionProperty from a CZML packet.
Name Type Description
object object 将添加或更新财产的对象.
propertyName string 物体上的财产名称.
packetData object The CZML packet being processed.
interval TimeInterval 数据有效的约束间隔 .
sourceUri string 正在处理的数据的原始内容.
entityCollection EntityCollection 正在处理收藏.

load(czml, options)Promise.<CzmlDataSource>

装入提供的 url 或 NT%0 对象,替换任何已有数据.
Name Type Description
czml Resource | string | object Url 或 CZML 对象待处理.
options CzmlDataSource.LoadOptions optional 指定配置选项的对象
Returns:
一旦数据得到处理,就可以解决这种情况的承诺.

process(czml, options)Promise.<CzmlDataSource>

在不清理任何现有数据的情况下处理所提供的 URl 或 NT% 0 对象 .
Name Type Description
czml Resource | string | object Url 或 CZML 对象待处理.
options CzmlDataSource.LoadOptions optional 指定配置选项的对象
Returns:
一旦数据得到处理,就可以解决这种情况的承诺.

update(time)boolean

将数据源更新到所提供时间。 此函数是可选的,并且 不需要执行。 提供的数据来源为: 根据当前动画时间或场景状态检索数据. If implemented, update will be called by DataSourceDisplay once a frame.
Name Type Description
time JulianDate 模拟时间.
Returns:
如果此数据源准备在指定时间显示, 则不正确 .

Type Definitions

Cesium.CzmlDataSource.LoadOptions

NT 0 load NT 1 方法的初始化选项.
Properties:
Name Type Attributes Description
sourceUri Resource | string <optional>
覆盖用于解析相对链接的url.
credit Credit | string <optional>
数据源的信用,在画布上显示.

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

Name Type Description
entity Entity
packet object
entityCollection EntityCollection
sourceUri string
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.