ImageryLayerCollection

open external class ImageryLayerCollection(source)

An ordered collection of imagery layers for rendering raster imagery on a Globe or Cesium3DTileset.

See also

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
external var layerAdded: DefaultEvent

An event that is raised when a layer is added to the collection. Event handlers are passed the layer that was added and the index at which it was added.

Link copied to clipboard
external var layerMoved: DefaultEvent

An event that is raised when a layer changes position in the collection. Event handlers are passed the layer that was moved, its new index after the move, and its old index prior to the move.

Link copied to clipboard

An event that is raised when a layer is removed from the collection. Event handlers are passed the layer that was removed and the index from which it was removed.

Link copied to clipboard

An event that is raised when a layer is shown or hidden by setting the ImageryLayer.show property. Event handlers are passed a reference to this layer, the index of the layer in the collection, and a flag that is true if the layer is now shown or false if it is now hidden.

Link copied to clipboard
external var length: Int

Gets the number of layers in this collection.

Functions

Link copied to clipboard
external fun add(layer: ImageryLayer, index: Int? = definedExternally)

Adds a layer to the collection.

Link copied to clipboard
external fun addImageryProvider(imageryProvider: ImageryProvider, index: Int? = definedExternally): ImageryLayer

Creates a new layer using the given ImageryProvider and adds it to the collection.

Link copied to clipboard
external fun contains(layer: ImageryLayer): Boolean

Checks to see if the collection contains a given layer.

Link copied to clipboard
external fun destroy()

Destroys the WebGL resources held by all layers in this collection. Explicitly destroying this object allows for deterministic release of WebGL resources, instead of relying on the garbage collector.

Link copied to clipboard
external fun get(index: Int): ImageryLayer

Gets a layer by index from the collection.

Link copied to clipboard
external fun indexOf(layer: ImageryLayer): Int

Determines the index of a given layer in the collection.

Link copied to clipboard
external fun isDestroyed(): Boolean

Returns true if this object was destroyed; otherwise, false.

Link copied to clipboard
external fun lower(layer: ImageryLayer)

Lowers a layer down one position in the collection.

Link copied to clipboard
external fun lowerToBottom(layer: ImageryLayer)

Lowers a layer to the bottom of the collection.

Link copied to clipboard

Asynchronously determines the imagery layer features that are intersected by a pick ray. The intersected imagery layer features are found by invoking ImageryProvider.pickFeatures for each imagery layer tile intersected by the pick ray. To compute a pick ray from a location on the screen, use Camera.getPickRay.

Link copied to clipboard
external fun pickImageryLayers(ray: Ray, scene: Scene): ReadonlyArray<ImageryLayer>?

Determines the imagery layers that are intersected by a pick ray. To compute a pick ray from a location on the screen, use Camera.getPickRay.

Link copied to clipboard
external fun raise(layer: ImageryLayer)

Raises a layer up one position in the collection.

Link copied to clipboard
external fun raiseToTop(layer: ImageryLayer)

Raises a layer to the top of the collection.

Link copied to clipboard
external fun remove(layer: ImageryLayer, destroy: Boolean? = definedExternally): Boolean

Removes a layer from this collection, if present.

Link copied to clipboard
external fun removeAll(destroy: Boolean? = definedExternally)

Removes all layers from this collection.