TimeIntervalCollectionProperty

new Cesium.TimeIntervalCollectionProperty()

一个由 TimeIntervalCollection 定义的 Property,其中每个 TimeInterval 的 data 属性表示相应时间处的值。
Example:
//Create a Cartesian2 interval property which contains data on August 1st, 2012
//and uses a different value every 6 hours.
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 另一个 property。
Returns:
true 表示 left 和 right 相等,否则为 false
获取属性在给定时间处的值。
Name Type Default Description
time JulianDate JulianDate.now() optional 检索值所对应的时间。如果省略,则使用当前系统时间。
result object optional 存储值的对象,如果省略,则会创建并返回一个新实例。
Returns:
修改后的 result 参数,如果未提供 result 参数则为新实例。
需要帮助?获取答案的最快方式是在 Cesium 论坛 上向社区和团队提问。