AssociativeArray

new Cesium.AssociativeArray()

A collection of key-value pairs that is stored as a hash for easy lookup but also provides an array for fast iteration.

成员(属性)

Gets the number of items in the collection.
Gets an unordered array of all values in the collection. This is a live array that will automatically reflect the values in the collection, it should not be modified directly.

方法

contains(key)boolean

Determines if the provided key is in the array.
参数名称 类型 描述信息
key string | number The key to check.
返回值:
true if the key is in the array, false otherwise.
Retrieves the value associated with the provided key.
参数名称 类型 描述信息
key string | number The key whose value is to be retrieved.
返回值:
The associated value, or undefined if the key does not exist in the collection.
Removes a key-value pair from the collection.
参数名称 类型 描述信息
key string | number The key to be removed.
返回值:
True if it was removed, false if the key was not in the collection.
Clears the collection.
Associates the provided key with the provided value. If the key already exists, it is overwritten with the new value.
参数名称 类型 描述信息
key string | number A unique identifier.
value * The value to associate with the provided key.