I am able to get height/elevation of terrain for specific coordinates only after “flying” to that location, how can I retrieve elevation same without “flying” there?
P.S as I understand viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(longitude, latitude))
returns real value (not “undefined”) only when terrain in rendered/camera is close to that location. Could not find much up to date information related to this topic (I am using 1.115 version).
viewer.camera.flyTo({
destination: Cesium.Cartesian3.fromDegrees(longitude, latitude),
orientation: {
heading: Cesium.Math.toRadians(0),
pitch: Cesium.Math.toRadians(-35.0),
roll: 0.0
},
complete: () => {
setTimeout(() => {
const height = viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(longitude, latitude));
addSomeModel(viewer, longitude, latitude, height);
}, 2000);
}
});