FlattingRegionCollection

new Cesium.FlattingRegionCollection(options)

flatting region collection
Name Type Description
options Object optional Object with the following properties:
Name Type Description
enabled Boolean optional If true, FlattingRegionCollection will be enabled
regions Array.<FlattingRegion> optional An array of FlattingRegion objects used to flat
See:

Members

If true, FlattingRegionCollection will be enabled
Enabled array of the flattingRegions
Returns the number of regions in this collection. This is commonly used with FlattingRegionCollection#get to iterate over all the regions in the collection.
An event triggered when a new flatting region is added to the collection. Event handlers are passed the new region and the index at which it was added.
Default Value: Event()
An event triggered when a new flatting region is removed from the collection. Event handlers are passed the new region and the index from which it was removed
Default Value: Event()
Array of the flattingRegions
An event triggered when a new flatting region of the collection is updated. Event handlers are passed the new region and the index at which it was added.
Default Value: Event()

Methods

add region to the collection
Name Type Description
region FlattingRegion The FlattingRegion to add to the collection.
Returns:
True for success, otherwise false.
Destroys the WebGL resources held by this object. Destroying an object allows for deterministic release of WebGL resources, instead of relying on the garbage collector to destroy this object.

Once an object is destroyed, it should not be used; calling any function other than isDestroyed will result in a DeveloperError exception. Therefore, assign the return value (undefined) to the object as done in the example.
Throws:
  • DeveloperError : This object was destroyed, i.e., destroy() was called.
Example:
flattingRegions = flattingRegions && flattingRegions.destroy();
See:
Returns the region in the collection. FlattingRegionCollection#length to iterate over all the regions in the collection.
Name Type Description
id String The region's id.
Returns:
Returns true if this object was destroyed; otherwise, false.

If this object was destroyed, it should not be used; calling any function other than isDestroyed will result in a DeveloperError exception.
Returns:
true if this object was destroyed; otherwise, false.
See:
remove the region by id
Name Type Description
id String The region's id.
Returns:
true for success, otherwise false.
Removes all regions from the collection.
See:
Called when Viewer or CesiumWidget render the scene to build the resources for clipping planes.

Do not call this function directly.

updateRegionById(region, id)Boolean

update the region's info by id
Name Type Description
region FlattingRegion Updated region.
id String The old region's id.
Returns:
True for success, otherwise false.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.