fromUrl

suspend fun fromUrl(url: ERROR CLASS: Symbol not found for JsAny, options: Cesium3DTilesTerrainProvider.ConstructorOptions? = definedExternally): Cesium3DTilesTerrainProvider(source)

Creates a TerrainProvider that accesses terrain data in a Cesium 3D Tiles format.

// Create terrain with normals.
try {
const viewer = new Viewer("cesiumContainer", {
terrainProvider: await Cesium3DTilesTerrainProvider.fromUrl(
IonResource.fromAssetId(3956), {
requestVertexNormals: true
})
});
} catch (error) {
console.log(error);
}

Return

A promise that resolves to the terrain provider.

Parameters

url

The URL of the Cesium terrain server.

options

An object describing initialization options.

See also