ImageryLayer

external class ImageryLayer(val imageryProvider: ImageryProvider = definedExternally, options: ImageryLayer.ConstructorOptions? = definedExternally)(source)

An imagery layer that displays tiled image data from a single imagery provider on a Globe.

// Add an OpenStreetMaps layer
const imageryLayer = new ImageryLayer(new OpenStreetMapImageryProvider({
url: "https://tile.openstreetmap.org/"
}));
scene.imageryLayers.add(imageryLayer);
// Add Cesium ion's default world imagery layer
const imageryLayer = ImageryLayer.fromWorldImagery();
scene.imageryLayers.add(imageryLayer);
// Add a new transparent layer from Cesium ion
const imageryLayer = ImageryLayer.fromProviderAsync(IonImageryProvider.fromAssetId(3812));
imageryLayer.alpha = 0.5;
scene.imageryLayers.add(imageryLayer);

Parameters

options

An object describing initialization options

See also

Constructors

Link copied to clipboard
constructor(imageryProvider: ImageryProvider = definedExternally, options: ImageryLayer.ConstructorOptions? = definedExternally)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
sealed interface ConstructorOptions

Initialization options for the ImageryLayer constructor.

Properties

Link copied to clipboard

The alpha blending value of this layer, with 0.0 representing fully transparent and 1.0 representing fully opaque.

Link copied to clipboard

The brightness of this layer. 1.0 uses the unmodified imagery color. Less than 1.0 makes the imagery darker while greater than 1.0 makes it brighter.

Link copied to clipboard

Color value that should be set to transparent.

Link copied to clipboard

Normalized (0-1) threshold for color-to-alpha.

Link copied to clipboard

The contrast of this layer. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the contrast while greater than 1.0 increases it.

Link copied to clipboard

Rectangle cutout in this layer of imagery.

Link copied to clipboard

The alpha blending value of this layer on the day side of the globe, with 0.0 representing fully transparent and 1.0 representing fully opaque. This only takes effect when Globe.enableLighting is true.

Link copied to clipboard

The gamma correction to apply to this layer. 1.0 uses the unmodified imagery color.

Link copied to clipboard
var hue: Double

The hue of this layer in radians. 0.0 uses the unmodified imagery color.

Link copied to clipboard

The imagery provider to use.

Link copied to clipboard
Link copied to clipboard

The alpha blending value of this layer on the night side of the globe, with 0.0 representing fully transparent and 1.0 representing fully opaque. This only takes effect when Globe.enableLighting is true.

Link copied to clipboard

Returns true when the terrain provider has been successfully created. Otherwise, returns false.

Link copied to clipboard

Gets an event that is raised when the imagery provider has been successfully created. Event listeners are passed the created instance of ImageryProvider.

Link copied to clipboard

Gets the rectangle of this layer. If this rectangle is smaller than the rectangle of the ImageryProvider, only a portion of the imagery provider is shown.

Link copied to clipboard

The saturation of this layer. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the saturation while greater than 1.0 increases it.

Link copied to clipboard

Determines if this layer is shown.

Link copied to clipboard

The SplitDirection to apply to this layer.

Functions

Link copied to clipboard
fun destroy()

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.

Link copied to clipboard

Computes the intersection of this layer's rectangle with the imagery provider's availability rectangle, producing the overall bounds of imagery that can be produced by this layer.

Link copied to clipboard

Gets a value indicating whether this layer is the base layer in the ImageryLayerCollection. The base layer is the one that underlies all others. It is special in that it is treated as if it has global rectangle, even if it actually does not, by stretching the texels at the edges over the entire globe.

Link copied to clipboard

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