createGooglePhotorealistic3DTileset

suspend external fun createGooglePhotorealistic3DTileset(key: String? = definedExternally, options: Cesium3DTileset.ConstructorOptions? = definedExternally): Cesium3DTileset(source)

Creates a Cesium3DTileset instance for the Google Photorealistic 3D Tiles tileset.

const viewer = new Viewer("cesiumContainer");

try {
const tileset = await createGooglePhotorealistic3DTileset();
viewer.scene.primitives.add(tileset));
} catch (error) {
console.log(`Error creating tileset: ${error}`);
}
// Use your own Google Maps API key
GoogleMaps.defaultApiKey = "your-api-key";

const viewer = new Viewer("cesiumContainer");

try {
const tileset = await createGooglePhotorealistic3DTileset();
viewer.scene.primitives.add(tileset));
} catch (error) {
console.log(`Error creating tileset: ${error}`);
}

Parameters

key

Your API key to access Google Photorealistic 3D Tiles. See [https://developers.google.com/maps/documentation/javascript/get-api-key] for instructions on how to create your own key. Default value - GoogleMaps.defaultApiKey

options

An object describing initialization options.

See also