TimeIntervalCollectionProperty

new Cesium.TimeIntervalCollectionProperty()

一个由 TimeIntervalCollection 定义的 Property, 其中每个 TimeInterval 的 data 属性表示时间对应的值。
Example:
//创建一个 Cartesian2 时间间隔属性,包含 2012年8月1日 的数据,
//每 6 小时使用不同的值。
const composite = new Cesium.TimeIntervalCollectionProperty();
composite.intervals.addInterval(Cesium.TimeInterval.fromIso8601({
    iso8601 : '2012-08-01T00:00:00.00Z/2012-08-01T06:00:00.00Z',
    isStartIncluded : true,
    isStopIncluded : false,
    data : new Cesium.Cartesian2(2.0, 3.4)
}));
composite.intervals.addInterval(Cesium.TimeInterval.fromIso8601({
    iso8601 : '2012-08-01T06:00:00.00Z/2012-08-01T12:00:00.00Z',
    isStartIncluded : true,
    isStopIncluded : false,
    data : new Cesium.Cartesian2(12.0, 2.7)
}));
composite.intervals.addInterval(Cesium.TimeInterval.fromIso8601({
    iso8601 : '2012-08-01T12:00:00.00Z/2012-08-01T18:00:00.00Z',
    isStartIncluded : true,
    isStopIncluded : false,
    data : new Cesium.Cartesian2(5.0, 12.4)
}));
composite.intervals.addInterval(Cesium.TimeInterval.fromIso8601({
    iso8601 : '2012-08-01T18:00:00.00Z/2012-08-02T00:00:00.00Z',
    isStartIncluded : true,
    isStopIncluded : true,
    data : new Cesium.Cartesian2(85.0, 4.1)
}));

Members

获取当此属性的定义发生更改时引发的事件。 只要使用与当前值不同的数据调用 setValue,定义就会更改。
获取时间间隔集合。
获取一个值,指示此属性是否为常量。如果 getValue 对当前定义始终返回相同结果,则该属性被视为常量。

Methods

将此属性与提供的属性进行比较,如果相等则返回 true,否则返回 false
Name Type Description
other Property optional 另一个属性。
Returns:
如果相等则返回 true,否则返回 false
获取属性在指定时间的值。
Name Type Default Description
time JulianDate JulianDate.now() optional 要获取值的时间。如果省略,则使用当前系统时间。
result object optional 用于存储值的对象,如果省略,则创建并返回一个新实例。
Returns:
修改后的结果参数,如果未提供结果参数,则返回新实例。
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.