fromWorldBathymetry

Creates a Terrain instance for Cesium World Bathymetry.

// Create Cesium World Bathymetry with default settings
const viewer = new Viewer("cesiumContainer", {
terrain: fromWorldBathymetry)
});
// Create Cesium World Terrain with normals.
const viewer1 = new Viewer("cesiumContainer", {
terrain: fromWorldBathymetry({
requestVertexNormals: true
});
});
// Handle loading events
const bathymetry = Terrain.fromWorldBathymetry();

scene.setTerrain(bathymetry);

bathymetry.readyEvent.addEventListener(provider => {
scene.globe.enableLighting = true;

bathymetry.provider.errorEvent.addEventListener(error => {
alert(`Encountered an error while loading bathymetric terrain tiles! ${error}`);
});
});

bathymetry.errorEvent.addEventListener(error => {
alert(`Encountered an error while creating bathymetric terrain! ${error}`);
});

Return

An asynchronous helper object for a CesiumTerrainProvider

See also