Appearance
KBE3D / KBCore / Cesium / CzmlDataSource
类: CzmlDataSource
A DataSource which processes CZML.
参数
An optional name for the data source. This value will be overwritten if a loaded document contains a name.
属性
updaters
staticupdaters:UpdaterFunction[]
Gets the array of CZML processing functions.
name
name:
string
Gets a human-readable name for this instance.
clock
clock:
DataSourceClock
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.
entities
entities:
EntityCollection
Gets the collection of Entity instances.
isLoading
isLoading:
boolean
Gets a value indicating if 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.
credit
credit:
Credit
Gets the credit that will be displayed for the data source
方法
load()
staticload(czml:any,options?:LoadOptions):Promise<CzmlDataSource>
Creates a Promise to a new instance loaded with the provided CZML data.
参数
czml
any
A url or CZML object to be processed.
options?
An object specifying configuration options
返回
Promise<CzmlDataSource>
A promise that resolves to the new instance once the data is processed.
processPacketData()
staticprocessPacketData(type: (...params:any[]) =>any,object:any,propertyName:string,packetData:any,interval:TimeInterval,sourceUri:string,entityCollection:EntityCollection):void
A helper function used by custom CZML updater functions which creates or updates a Property from a CZML packet.
参数
type
(...params: any[]) => any
The constructor function for the property being processed.
object
any
The object on which the property will be added or updated.
propertyName
string
The name of the property on the object.
packetData
any
The CZML packet being processed.
interval
A constraining interval for which the data is valid.
sourceUri
string
The originating uri of the data being processed.
entityCollection
The collection being processsed.
返回
void
processPositionPacketData()
staticprocessPositionPacketData(object:any,propertyName:string,packetData:any,interval:TimeInterval,sourceUri:string,entityCollection:EntityCollection):void
A helper function used by custom CZML updater functions which creates or updates a PositionProperty from a CZML packet.
参数
object
any
The object on which the property will be added or updated.
propertyName
string
The name of the property on the object.
packetData
any
The CZML packet being processed.
interval
A constraining interval for which the data is valid.
sourceUri
string
The originating uri of the data being processed.
entityCollection
The collection being processsed.
返回
void
processMaterialPacketData()
staticprocessMaterialPacketData(object:any,propertyName:string,packetData:any,interval:TimeInterval,sourceUri:string,entityCollection:EntityCollection):void
A helper function used by custom CZML updater functions which creates or updates a MaterialProperty from a CZML packet.
参数
object
any
The object on which the property will be added or updated.
propertyName
string
The name of the property on the object.
packetData
any
The CZML packet being processed.
interval
A constraining interval for which the data is valid.
sourceUri
string
The originating uri of the data being processed.
entityCollection
The collection being processsed.
返回
void
process()
process(
czml:any,options?:LoadOptions):Promise<CzmlDataSource>
Processes the provided url or CZML object without clearing any existing data.
参数
czml
any
A url or CZML object to be processed.
options?
An object specifying configuration options
返回
Promise<CzmlDataSource>
A promise that resolves to this instances once the data is processed.
load()
load(
czml:any,options?:LoadOptions):Promise<CzmlDataSource>
Loads the provided url or CZML object, replacing any existing data.
参数
czml
any
A url or CZML object to be processed.
options?
An object specifying configuration options
返回
Promise<CzmlDataSource>
A promise that resolves to this instances once the data is processed.
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
The simulation time.
返回
boolean
True if this data source is ready to be displayed at the provided time, false otherwise.
构造函数
构造函数
new CzmlDataSource(
name?:string):CzmlDataSource
参数
name?
string
返回
CzmlDataSource
