| | |
| | | }) |
| | | |
| | | // 最小 |
| | | global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 220 |
| | | global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 100 |
| | | // 最大 |
| | | global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 400 |
| | | |
| | |
| | | global.viewer.camera.positionCartographic.height |
| | | ) |
| | | |
| | | if (height <= 250) { |
| | | if (height < 150) { |
| | | global.viewer.camera.setView({ |
| | | destination: |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 280 |
| | | 200 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | |
| | | return |
| | | } |
| | | |
| | | if (height > 250 && height <= 310) { |
| | | if (height < 250) { |
| | | global.viewer.camera.setView({ |
| | | destination: |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 340 |
| | | 300 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | |
| | | return |
| | | } |
| | | |
| | | if (height > 310 && height < 370) { |
| | | if (height < 350) { |
| | | global.viewer.camera.setView({ |
| | | destination: |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | |
| | | global.viewer.camera.positionCartographic.height |
| | | ) |
| | | |
| | | if (height > 370) { |
| | | if (height > 350) { |
| | | global.viewer.camera.setView({ |
| | | destination: |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 340 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | |
| | | return |
| | | } |
| | | |
| | | if (height > 310) { |
| | | global.viewer.camera.setView({ |
| | | destination: |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 280 |
| | | 300 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 220 |
| | | 200 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | |
| | | return |
| | | } |
| | | |
| | | if (height > 150) { |
| | | global.viewer.camera.setView({ |
| | | destination: |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 100 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | } |
| | | }) |
| | | |
| | | if (height <= 250) { |
| | | if (height < 150) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 220 |
| | | 100 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | }) |
| | | } |
| | | |
| | | if (height > 250 && height <= 310) { |
| | | if (height > 150 && height <= 250) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 280 |
| | | 200 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | }) |
| | | } |
| | | |
| | | if (height > 310 && height <= 370) { |
| | | if (height > 250 && height <= 350) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 340 |
| | | 300 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | }) |
| | | } |
| | | |
| | | if (height > 370) { |
| | | if (height > 350) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | |
| | | } |
| | | }) |
| | | // 最小 |
| | | global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 220 |
| | | global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 100 |
| | | // 最大 |
| | | global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 400 |
| | | // 视角旋转 |