| | |
| | | const height = Math.ceil( |
| | | viewer.camera.positionCartographic.height |
| | | ); |
| | | |
| | | if (height > 360) { |
| | | if (height > 180) { |
| | | viewer.camera.setView({ |
| | | destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | viewer.camera.positionCartographic.longitude, |
| | | viewer.camera.positionCartographic.latitude, |
| | | 330 |
| | | 160 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | return; |
| | | } |
| | | |
| | | if (height > 300) { |
| | | if (height > 140) { |
| | | viewer.camera.setView({ |
| | | destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | viewer.camera.positionCartographic.longitude, |
| | | viewer.camera.positionCartographic.latitude, |
| | | 270 |
| | | 120 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | return; |
| | | } |
| | | |
| | | if (height > 240) { |
| | | if (height > 100) { |
| | | viewer.camera.setView({ |
| | | destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | viewer.camera.positionCartographic.longitude, |
| | | viewer.camera.positionCartographic.latitude, |
| | | 200 |
| | | 80 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | const height = Math.ceil( |
| | | viewer.camera.positionCartographic.height |
| | | ); |
| | | console.log(height); |
| | | |
| | | if (height <= 240) { |
| | | if (height <= 100) { |
| | | viewer.camera.setView({ |
| | | destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | viewer.camera.positionCartographic.longitude, |
| | | viewer.camera.positionCartographic.latitude, |
| | | 270 |
| | | 120 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | }); |
| | | } |
| | | |
| | | if (height > 240 && height <= 300) { |
| | | if (height > 100 && height <= 140) { |
| | | viewer.camera.setView({ |
| | | destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | viewer.camera.positionCartographic.longitude, |
| | | viewer.camera.positionCartographic.latitude, |
| | | 330 |
| | | 160 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | }); |
| | | } |
| | | |
| | | if (height > 300 && height < 360) { |
| | | if (height > 140 && height < 180) { |
| | | viewer.camera.setView({ |
| | | destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | viewer.camera.positionCartographic.longitude, |
| | | viewer.camera.positionCartographic.latitude, |
| | | 400 |
| | | 200 |
| | | ), |
| | | orientation: { |
| | | // 指向 |