DynamicObjectCollection

DynamicObjectCollection

new DynamicObjectCollection

A collection of DynamicObject instances.

Members

compositeCollection

The CompositeDynamicObjectCollection, if any, that this collection is in.

objectPropertiesChanged

An Event that is fired whenever DynamicObjects in the collection have properties added.

objectsRemoved

An Event that is fired whenever DynamicObjects are removed from the collection.

Methods

<static> prototype.clear

Removes all objects from the collection.

<static> prototype.computeAvailability

Computes the maximum availability of the DynamicObjects in the collection. If the collection contains a mix of infinitely available data and non-infinite data, It will return the interval pertaining to the non-infinite data only. If all data is infinite, an infinite interval will be returned.

Returns:
TimeInterval The availability of DynamicObjects in the collection.

<static> prototype.getObject

Gets an object with the specified id.

Parameters:
Name Type Description
id Object The id of the object to retrieve.
Throws:
DeveloperError : id is required.
Returns:
The DynamicObject with the provided id, or undefined if no such object exists.

<static> prototype.getObjects

Gets the array of DynamicObject instances in this composite collection.

Returns:
Array the array of DynamicObject instances in this composite collection.

<static> prototype.getOrCreateObject

Gets an object with the specified id or creates it and adds it to the collection if it does not exist.

Parameters:
Name Type Description
id Object The id of the object to retrieve.
Throws:
DeveloperError : id is required.
Returns:
The DynamicObject with the provided id.

<static> prototype.removeObject

Removes an object with the specified id.

Parameters:
Name Type Description
id Object The id of the object to remove.
Throws:
DeveloperError : id is required.
Returns:
True if the DynamicObject with the provided id was found and deleted.