Skip to content

KBE3D / KBCore / Cesium / createWorldImageryAsync

函数: createWorldImageryAsync()

createWorldImageryAsync(options?: { style?: IonWorldImageryStyle; }): Promise<IonImageryProvider>

Creates an IonImageryProvider instance for ion's default global base imagery layer, currently Bing Maps.

参数

options?

Object with the following properties:

style?

IonWorldImageryStyle

The style of base imagery, only AERIAL, AERIAL_WITH_LABELS, and ROAD are currently supported.

返回

Promise<IonImageryProvider>

Examples

ts
// Create a Cesium World Imagery base layer with default settings
try {
  const imageryProvider = await Cesium.createWorldImageryAsync();
} catch (error) {
  console.log(`There was an error creating world imagery: ${error}`);
}
ts
// Create Cesium World Imagery with different style
try {
  const imageryProvider = await Cesium.createWorldImageryAsync({
        style: Cesium.IonWorldImageryStyle.AERIAL_WITH_LABELS
  });
} catch (error) {
  console.log(`There was an error creating world imagery: ${error}`);
}

KBE3D @3.0.0 Copyright © 2024-present KBE3D