new Cesium.AssociativeArray()

以散列方式存储的密钥值对集 查找, 但也提供了快速迭代的阵列 .

Members

length : number

获取收藏中的项目数.

values : Array

获取收藏中所有值的无序数组. 这是一个将自动反映收藏中的值的活的数组, 不应直接修改.

Methods

contains(key)boolean

确定所提供的密钥是否在数组中.
Name Type Description
key string | number 检查的钥匙.
Returns:
如果按键在数组中, 则使用 NT 0 true NT 1 , 否则使用 NT 2 false NT 3 .

get(key)*

获取与所提供的密钥相关的值.
Name Type Description
key string | number 将取回其值的密钥 .
Returns:
关联值,或者如果收藏中不存在密钥,则未定义 .

remove(key)boolean

从收藏中删除密钥值对.
Name Type Description
key string | number 要删除的密钥 .
Returns:
如果它被移除, 假的,如果钥匙不在收藏中.

removeAll()

清净藏品.

set(key, value)

将所提供的钥匙与所提供的价值联系起来。 如果已经有密钥 ,它以新值覆盖.
Name Type Description
key string | number 一个独特的标识符.
value * 与所提供的密钥关联的价值 .
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.