new Cesium.TimeIntervalCollection(intervals)

A non-overlapping collection of TimeInterval instances sorted by start time.
Name Type Description
intervals Array.<TimeInterval> optional 用于添加收藏的间隔数组 .

Members

readonly changedEvent : Event

获得一个每次收集间隔变化时都会提起的事件.

readonly isEmpty : boolean

获取收藏是否为空 .

readonly isStartIncluded : boolean

获取开始时间是否包含在收藏中 .

readonly isStopIncluded : boolean

获取停止时间是否包含在收藏中.

readonly length : number

获取收藏中的间隔数.

readonly start : JulianDate

获得收藏的开始时间.

readonly stop : JulianDate

获得收藏的停止时间.

Methods

static Cesium.TimeIntervalCollection.fromIso8601(options, result)TimeIntervalCollection

Creates a new instance from an ISO 8601 time interval (start/end/duration).
Name Type Description
options object 下列属性的对象 :
Name Type Default Description
iso8601 string 时间间隔为 NT 0 8601.
isStartIncluded boolean true optional true if start time is included in the interval, false otherwise.
isStopIncluded boolean true optional true if stop time is included in the interval, false otherwise.
leadingInterval boolean false optional 如果想要从 Iso8601.MINIMUM_VALUE 开始时间的间隔, 否则.
trailingInterval boolean false optional true if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false otherwise.
dataCallback function optional 函数将返回每个间隔所调用的数据,然后将其添加到收藏中。 如果未说明,数据将成为收集中的索引.
result TimeIntervalCollection optional 用于结果的现有实例.
Returns:
未提供修改的结果参数或新实例 .

static Cesium.TimeIntervalCollection.fromIso8601DateArray(options, result)TimeIntervalCollection

Creates a new instance from a ISO 8601 date array.
Name Type Description
options object 下列属性的对象 :
Name Type Default Description
iso8601Dates Array.<string> 以 NT 0 8601为日期的阵列.
isStartIncluded boolean true optional true if start time is included in the interval, false otherwise.
isStopIncluded boolean true optional true if stop time is included in the interval, false otherwise.
leadingInterval boolean false optional 如果想要从 Iso8601.MINIMUM_VALUE 开始时间的间隔, 否则.
trailingInterval boolean false optional true if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false otherwise.
dataCallback function optional 函数将返回每个间隔所调用的数据,然后将其添加到收藏中。 如果未说明,数据将成为收集中的索引.
result TimeIntervalCollection optional 用于结果的现有实例.
Returns:
未提供修改的结果参数或新实例 .

static Cesium.TimeIntervalCollection.fromIso8601DurationArray(options, result)TimeIntervalCollection

Creates a new instance from a ISO 8601 duration array.
Name Type Description
options object 下列属性的对象 :
Name Type Default Description
epoch JulianDate 持续时间相对日期.
iso8601Durations string 持续时间为 NT 0 8601的阵列.
relativeToPrevious boolean false optional real 如果持续时间与上一个日期相对, false 如果总是与时代相对.
isStartIncluded boolean true optional true if start time is included in the interval, false otherwise.
isStopIncluded boolean true optional true if stop time is included in the interval, false otherwise.
leadingInterval boolean false optional 如果想要从 Iso8601.MINIMUM_VALUE 开始时间的间隔, 否则.
trailingInterval boolean false optional true if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false otherwise.
dataCallback function optional 函数将返回每个间隔所调用的数据,然后将其添加到收藏中。 如果未说明,数据将成为收集中的索引.
result TimeIntervalCollection optional 用于结果的现有实例.
Returns:
未提供修改的结果参数或新实例 .

static Cesium.TimeIntervalCollection.fromJulianDateArray(options, result)TimeIntervalCollection

从 NT 0 阵列创建新实例.
Name Type Description
options object 下列属性的对象 :
Name Type Default Description
julianDates Array.<JulianDate> 以 NT 0 8601为日期的阵列.
isStartIncluded boolean true optional true if start time is included in the interval, false otherwise.
isStopIncluded boolean true optional true if stop time is included in the interval, false otherwise.
leadingInterval boolean false optional 如果想要从 Iso8601.MINIMUM_VALUE 开始时间的间隔, 否则.
trailingInterval boolean false optional true if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, false otherwise.
dataCallback function optional 函数将返回每个间隔所调用的数据,然后将其添加到收藏中。 如果未说明,数据将成为收集中的索引.
result TimeIntervalCollection optional 用于结果的现有实例.
Returns:
未提供修改的结果参数或新实例 .

addInterval(interval, dataComparer)

在收集中添加一个间隔,合并包含相同数据的间隔 视需要将不同数据的间隔分开,以便保持不重叠的收集. 新的间隔中的数据优先于收集中的任何现有间隔.
Name Type Description
interval TimeInterval 要添加的间隔 .
dataComparer TimeInterval.DataComparer optional 用于比较两个间隔的数据的函数。 如果省略,则使用引用平等.

contains(julianDate)boolean

检查指定日期是否在此收藏中 .
Name Type Description
julianDate JulianDate 检查日期.
Returns:
如果收藏中包含指定日期, 则使用 NT 0 true NT 1 , 否则使用 NT 2 false NT 3 .

equals(right, dataComparer)boolean

将此实例与所提供的实例组件进行比较并返回 -NT+0+Treal NT+1+,如果两者是相等的, NT+2+false NT+3+否则.
Name Type Description
right TimeIntervalCollection optional 右手边集.
dataComparer TimeInterval.DataComparer optional 用于比较两个间隔的数据的函数。 如果省略,则使用引用平等.
Returns:
-NT+0+Treal NT+1+,如果两者是相等的, NT+2+false NT+3+否则.

findDataForIntervalContainingDate(date)object

查找并返回包含指定日期的间隔数据.
Name Type Description
date JulianDate 寻之日期.
Returns:
包含指定日期的间隔数据, 如果没有这样的间隔, 或 NT% 0 unfined NT% 1 .

findInterval(options)TimeInterval|undefined

返回收藏中符合指定参数的第一个间隔. 所有参数都是可选的,并且 未定义 参数被视作不关心条件.
Name Type Description
options object optional 下列属性的对象 :
Name Type Description
start JulianDate optional 间隔的起始时间 .
stop JulianDate optional 间隔的停止时间 .
isStartIncluded boolean optional true if options.start is included in the interval, false otherwise.
isStopIncluded boolean optional true if options.stop is included in the interval, false otherwise.
Returns:
匹配指定参数的收藏中的第一个间隔 .

findIntervalContainingDate(date)TimeInterval|undefined

查找并返回包含指定日期的间隔.
Name Type Description
date JulianDate 寻之日期.
Returns:
包含指定日期的间隔, 如果不存在此间隔 .

get(index)TimeInterval|undefined

获取指定索引的间隔.
Name Type Description
index number 要检索的间隔索引 .
Returns:
指定索引的间隔, 如果该索引不存在间隔 .

indexOf(date)number

查找并返回收藏中包含指定日期的间隔索引.
Name Type Description
date JulianDate 寻之日期.
Returns:
包含指定日期的间隔索引,如果没有这样的间隔, 它返回一个负数,这是下一个间隔索引的位元补充 起始日期之后,或者如果指定日期之后没有间隔开始,则位元补充 收藏的长度.

intersect(other, dataComparer, mergeCallback)TimeIntervalCollection

创建新实例, 即此收藏和所提供收藏的交叉点 .
Name Type Description
other TimeIntervalCollection 集为相交.
dataComparer TimeInterval.DataComparer optional 用于比较两个间隔的数据的函数。 如果省略,则使用引用平等.
mergeCallback TimeInterval.MergeCallback optional 一个合并两个间隔的数据的函数。 如果省略,将使用左间隔的数据.
Returns:
新的 TimeInterval Collection 是此收藏和所提供的收藏的交叉点 .

removeAll()

删除收藏中的所有间隔.

removeInterval(interval)boolean

删除此间隔收藏中指定的间隔, 在指定间隔上创建一个孔. 输入间隔的数据属性被忽略.
Name Type Description
interval TimeInterval 要删除的间隔 .
Returns:
如果该间隔被删除,如果该间隔中没有一部分在收藏中,则使用 NT##0 real NT#+1 , NT 2 假 NT 3 .
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.