CompositeDynamicObjectCollection

CompositeDynamicObjectCollection

new

Non-destructively composites multiple DynamicObjectCollection instances into a single collection. If a DynamicObject with the same ID exists in multiple collections, it is non-destructively merged into a single new object instance. If an object has the same property in multiple collections, the property of the DynamicObject in the last collection of the list it belongs to is used. CompositeDynamicObjectCollection can be used almost anywhere that a DynamicObjectCollection is used.

Parameters:
Name Type Argument Description
collections Array <optional>
The initial list of DynamicObjectCollection instances to merge.
mergeFunctions Array <optional>
The list of CZML merge functions.
cleanFunctions Array <optional>
The list of CZML clean functions.
See:
Source:

Members

The array of functions which remove data from a DynamicObject instance.

The array of functions which merge DynamicObject instances together.

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

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

Methods

Clears all collections and DynamicObjects from this collection.

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.

Returns a copy of the current array of collections being composited. Changes to this array will have no affect, to change which collections are being used, call setCollections.

See:

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.

Gets the array of DynamicObject instances in this composite collection.

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

Sets the array of collections to be composited. Collections are composited last to first, so higher indices into the array take precedence over lower indices.

Parameters:
Name Type Description
collections Array The collections to be composited.