Skip to content

KBE3D / KBCore / Cesium / CustomDataSource

类: CustomDataSource

A DataSource implementation which can be used to manually manage a group of entities.

示例

ts
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);

参数

A human-readable name for this instance.

属性

name

name: string

Gets or sets a human-readable name for this instance.


clock

clock: DataSourceClock

Gets or sets the clock for this instance.


entities

entities: EntityCollection

Gets the collection of Entity instances.


isLoading

isLoading: boolean

Gets or sets whether the data source is currently loading data.


changedEvent

changedEvent: Event

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


errorEvent

errorEvent: Event

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


loadingEvent

loadingEvent: Event

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


show

show: boolean

Gets whether or not this data source should be displayed.


clustering

clustering: EntityCluster

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

方法

update()

update(time: JulianDate): boolean

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.

返回

boolean

True if this data source is ready to be displayed at the provided time, false otherwise.

构造函数

构造函数

new CustomDataSource(name?: string): CustomDataSource

参数

name?

string

返回

CustomDataSource

KBE3D @3.0.0 Copyright © 2024-present KBE3D