English中文

CustomDataSource

new Cesium.CustomDataSource(name)

A DataSource 可用于手动管理一组实体的实现。 implementation which can be used to manually manage a group of entities.
名称 Name 类型 Type 说明 Description
name string 可选 optional 此实例的人类可读名称。 A human-readable name for this instance.
示例: Example:
const dataSource = new Cesium.CustomDataSource('myData');

const entity = dataSource.entities.add({
   position : Cesium.Cartesian3.fromDegrees(1, 2, 0),
   billboard : {
       image : 'image.png'
   }
});

viewer.dataSources.add(dataSource);

成员 Members

获取当基础数据更改时将引发的事件。 Gets an event that will be raised when the underlying data changes.
获取或设置此实例的时钟。 Gets or sets the clock for this instance.
获取或设置此数据源的聚类选项。该对象可以在多个数据源之间共享。 Gets or sets the clustering options for this data source. This object can be shared between multiple data sources.
获取集合 Gets the collection of Entity instances.
获取在处理过程中遇到错误时将引发的事件。 Gets an event that will be raised if an error is encountered during processing.
获取或设置数据源当前是否正在加载数据。 Gets or sets whether the data source is currently loading data.
获取当数据源开始或停止加载时将引发的事件。 Gets an event that will be raised when the data source either starts or stops loading.
获取或设置此实例的人类可读名称。 Gets or sets a human-readable name for this instance.
获取是否应显示此数据源。 Gets whether or not this data source should be displayed.

方法 Methods

将数据源更新为提供的时间。该功能是可选的,不需要实现。它为根据当前动画时间或场景状态检索数据的数据源提供。如果实施,更新将被调用 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.
名称 Name 类型 Type 说明 Description
time JulianDate 模拟时间。 The simulation time.
返回: Returns:
如果此数据源已准备好在提供的时间显示,则为 true,否则为 false。 True if this data source is ready to be displayed at the provided time, false otherwise.
需要帮助吗?获得答案的最快方法是从社区和团队那里获得答案 Need help? The fastest way to get answers is from the community and team on the Cesium Forum.