add

fun add(layer: ImageryLayer, index: Int? = definedExternally)(source)

Adds a layer to the collection.

const imageryLayer = ImageryLayer.fromWorldImagery();
scene.imageryLayers.add(imageryLayer);
const imageryLayer = ImageryLayer.fromProviderAsync(IonImageryProvider.fromAssetId(3812));
scene.imageryLayers.add(imageryLayer);

Parameters

layer

the layer to add.

index

the index to add the layer at. If omitted, the layer will be added on top of all existing layers.

See also