1. A concise explanation of the problem you’re experiencing.
I’m trying to limit the tilt of the camera (not too near the ground), so I’m using camera.costrainedAxis.
I did some test to understand how it work but I get the error:
An error occurred while rendering. Rendering has stopped.
TypeError: Cannot read property ‘southwest’ of undefined
TypeError: Cannot read property ‘southwest’ of undefined
at M (https://cesiumjs.org/releases/1.61/Build/Cesium/Cesium.js:543:20546)
at I (https://cesiumjs.org/releases/1.61/Build/Cesium/Cesium.js:543:19375)
at O (https://cesiumjs.org/releases/1.61/Build/Cesium/Cesium.js:543:21276)
at M (https://cesiumjs.org/releases/1.61/Build/Cesium/Cesium.js:543:20896)
at I (https://cesiumjs.org/releases/1.61/Build/Cesium/Cesium.js:543:19375)
at O (https://cesiumjs.org/releases/1.61/Build/Cesium/Cesium.js:543:21276)
at M (https://cesiumjs.org/releases/1.61/Build/Cesium/Cesium.js:543:20896)
at I (https://cesiumjs.org/releases/1.61/Build/Cesium/Cesium.js:543:19375)
at O (https://cesiumjs.org/releases/1.61/Build/Cesium/Cesium.js:543:21276)
at M (https://cesiumjs.org/releases/1.61/Build/Cesium/Cesium.js:543:20896)
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
viewer.scene.camera.constrainedAxis = new Cesium.Cartesian3(45, 45, 45); // just for test
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
When tilting, to limit the height of the camera from the ground in 3d mode, because
-
I don’t want to see the horizon
-
often times the camera goes under the ground
4. The Cesium version you’re using, your operating system and browser.
1.61