fromWorldImagery
fun fromWorldImagery(options: ImageryLayer.Companion.WorldImageryConstructorOptions): ImageryLayer(source)
Create a new imagery layer for ion's default global base imagery layer, currently Bing Maps. The layer will handle any asynchronous loads or errors, and begin rendering the imagery layer once ready.
// Add a new transparent layer
const imageryLayer = ImageryLayer.fromWorldImagery();
imageryLayer.alpha = 0.5;
viewer.imageryLayers.add(imageryLayer);
Content copied to clipboard
// Handle loading events
const imageryLayer = ImageryLayer.fromWorldImagery();
viewer.imageryLayers.add(imageryLayer);
imageryLayer.readyEvent.addEventListener(provider => {
imageryLayer.provider.errorEvent.addEventListener(error => {
alert(`Encountered an error while loading imagery tiles! ${error}`);
});
});
imageryLayer.errorEvent.addEventListener(error => {
alert(`Encountered an error while creating an imagery layer! ${error}`);
});
Content copied to clipboard
Return
The created imagery layer.
// Create a new base layer
const viewer = new Viewer("cesiumContainer", {
baseLayer: fromWorldImagery();
});
Content copied to clipboard
Parameters
options
An object describing initialization options