createWorldTerrain

suspend external fun createWorldTerrain(options: CreateWorldTerrainAsyncOptions? = definedExternally): CesiumTerrainProvider(source)

Creates a CesiumTerrainProvider instance for the Cesium World Terrain.

// Create Cesium World Terrain with default settings
try {
const viewer = new Viewer("cesiumContainer", {
terrainProvider: await createWorldTerrainAsync();
});
} catch (error) {
console.log(error);
}
// Create Cesium World Terrain with water and normals.
try {
const viewer1 = new Viewer("cesiumContainer", {
terrainProvider: await createWorldTerrainAsync({
requestWaterMask: true,
requestVertexNormals: true
});
});
} catch (error) {
console.log(error);
}

Return

A promise that resolves to the created CesiumTerrainProvider

See also