| | |
| | | let layerSATtwo = null |
| | | let tcLayer = null |
| | | |
| | | let idlerFlag = true |
| | | |
| | | // const wallLayer = null |
| | | |
| | | export default { |
| | | name: 'dimension', |
| | | data () { |
| | | return { |
| | | |
| | | btnGroupShow: false, |
| | | dimensionValue: '三 维', |
| | | // 建筑2.5D地图 |
| | |
| | | [114.04006133, 27.628038, 100] |
| | | ], |
| | | mapCenter: [116.35381525, |
| | | 27.95839468, 400.0] |
| | | // mapCenter: [115.871863, 28.743861, 400.0] |
| | | 27.95839468, 950.0] |
| | | // mapCenter: [115.871863, 28.743861, 950.0] |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | select = { |
| | | overlay: null, |
| | | color: null |
| | | } |
| | | |
| | | windowAddMouseWheel() |
| | | function windowAddMouseWheel () { |
| | | var scrollFunc = function (e) { |
| | | e = e || window.event |
| | | if (e.wheelDelta) { // 判断浏览器IE,谷歌滑轮事件 |
| | | if (e.wheelDelta > 0) { // 当滑轮向上滚动时 |
| | | idlerFlag = false |
| | | } |
| | | if (e.wheelDelta < 0) { // 当滑轮向下滚动时 |
| | | idlerFlag = true |
| | | } |
| | | } else if (e.detail) { // Firefox滑轮事件 |
| | | if (e.detail > 0) { // 当滑轮向上滚动时 |
| | | idlerFlag = false |
| | | } |
| | | if (e.detail < 0) { // 当滑轮向下滚动时 |
| | | idlerFlag = true |
| | | } |
| | | } |
| | | } |
| | | // 给页面绑定滑轮滚动事件 |
| | | if (document.addEventListener) { // 火狐使用DOMMouseScroll绑定 |
| | | document.addEventListener('DOMMouseScroll', scrollFunc, false) |
| | | } |
| | | // 其他浏览器直接绑定滚动事件 |
| | | window.onmousewheel = document.onmousewheel = scrollFunc |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | }) |
| | | |
| | | // 最小 |
| | | global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 100 |
| | | global.eagleViewer.scene.screenSpaceCameraController.minimumZoomDistance = 1100 |
| | | global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 500 |
| | | global.eagleViewer.scene.screenSpaceCameraController.minimumZoomDistance = 1500 |
| | | // 最大 |
| | | // global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 400 |
| | | // global.eagleViewer.scene.screenSpaceCameraController.maximumZoomDistance = 1400 |
| | | global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 950 |
| | | global.eagleViewer.scene.screenSpaceCameraController.maximumZoomDistance = 1950 |
| | | |
| | | // 设置相机缩小时的速率 |
| | | global.viewer.scene.screenSpaceCameraController._minimumZoomRate = 2000 |
| | |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromDegrees( |
| | | that.mapCenter[0], |
| | | that.mapCenter[1], |
| | | 400.0 |
| | | 950.0 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | } |
| | | } |
| | | |
| | | // document.querySelector('.dc-zoom-controller').children[2].onclick = |
| | | // function () { |
| | | // if ( |
| | | // that.dimensionValue != undefined && |
| | | // that.dimensionValue != '真三维' |
| | | // ) { |
| | | // const height = Math.ceil( |
| | | // global.viewer.camera.positionCartographic.height |
| | | // ) |
| | | document.querySelector('.dc-zoom-controller').children[2].onclick = |
| | | function () { |
| | | if ( |
| | | that.dimensionValue != undefined && |
| | | that.dimensionValue != '真三维' |
| | | ) { |
| | | const height = Math.ceil( |
| | | global.viewer.camera.positionCartographic.height |
| | | ) |
| | | |
| | | // if (height < 150) { |
| | | // global.viewer.camera.setView({ |
| | | // destination: |
| | | // global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | // global.viewer.camera.positionCartographic.longitude, |
| | | // global.viewer.camera.positionCartographic.latitude, |
| | | // 200 |
| | | // ), |
| | | // orientation: { |
| | | // // 指向 |
| | | // heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // // 视角 |
| | | // pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | // roll: 0.0 |
| | | // } |
| | | // }) |
| | | if (height < 575) { |
| | | global.viewer.camera.setView({ |
| | | destination: |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 650 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | |
| | | // return |
| | | // } |
| | | return |
| | | } |
| | | |
| | | // if (height < 250) { |
| | | // global.viewer.camera.setView({ |
| | | // destination: |
| | | // global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | // global.viewer.camera.positionCartographic.longitude, |
| | | // global.viewer.camera.positionCartographic.latitude, |
| | | // 300 |
| | | // ), |
| | | // orientation: { |
| | | // // 指向 |
| | | // heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // // 视角 |
| | | // pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | // roll: 0.0 |
| | | // } |
| | | // }) |
| | | if (height < 725) { |
| | | global.viewer.camera.setView({ |
| | | destination: |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 800 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | |
| | | // return |
| | | // } |
| | | return |
| | | } |
| | | |
| | | // if (height < 350) { |
| | | // global.viewer.camera.setView({ |
| | | // destination: |
| | | // global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | // global.viewer.camera.positionCartographic.longitude, |
| | | // global.viewer.camera.positionCartographic.latitude, |
| | | // 400 |
| | | // ), |
| | | // orientation: { |
| | | // // 指向 |
| | | // heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // // 视角 |
| | | // pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | // roll: 0.0 |
| | | // } |
| | | // }) |
| | | // } |
| | | // } |
| | | // } |
| | | if (height < 875) { |
| | | global.viewer.camera.setView({ |
| | | destination: |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 950 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | |
| | | // document.querySelector('.dc-zoom-controller').children[0].onclick = |
| | | // function () { |
| | | // if ( |
| | | // that.dimensionValue != undefined && |
| | | // that.dimensionValue != '真三维' |
| | | // ) { |
| | | // const height = Math.ceil( |
| | | // global.viewer.camera.positionCartographic.height |
| | | // ) |
| | | document.querySelector('.dc-zoom-controller').children[0].onclick = |
| | | function () { |
| | | if ( |
| | | that.dimensionValue != undefined && |
| | | that.dimensionValue != '真三维' |
| | | ) { |
| | | const height = Math.ceil( |
| | | global.viewer.camera.positionCartographic.height |
| | | ) |
| | | |
| | | // if (height > 350) { |
| | | // global.viewer.camera.setView({ |
| | | // destination: |
| | | // global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | // global.viewer.camera.positionCartographic.longitude, |
| | | // global.viewer.camera.positionCartographic.latitude, |
| | | // 300 |
| | | // ), |
| | | // orientation: { |
| | | // // 指向 |
| | | // heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // // 视角 |
| | | // pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | // roll: 0.0 |
| | | // } |
| | | // }) |
| | | if (height > 875) { |
| | | global.viewer.camera.setView({ |
| | | destination: |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 800 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | |
| | | // return |
| | | // } |
| | | return |
| | | } |
| | | |
| | | // if (height > 250) { |
| | | // global.viewer.camera.setView({ |
| | | // destination: |
| | | // global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | // global.viewer.camera.positionCartographic.longitude, |
| | | // global.viewer.camera.positionCartographic.latitude, |
| | | // 200 |
| | | // ), |
| | | // orientation: { |
| | | // // 指向 |
| | | // heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // // 视角 |
| | | // pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | // roll: 0.0 |
| | | // } |
| | | // }) |
| | | if (height > 725) { |
| | | global.viewer.camera.setView({ |
| | | destination: |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 650 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | |
| | | // return |
| | | // } |
| | | 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: { |
| | | // // 指向 |
| | | // heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // // 视角 |
| | | // pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | // roll: 0.0 |
| | | // } |
| | | // }) |
| | | // } |
| | | // } |
| | | // } |
| | | if (height > 575) { |
| | | global.viewer.camera.setView({ |
| | | destination: |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 500 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | |
| | | // global.viewer.on(global.DC.SceneEventType.CAMERA_CHANGED, that.mapCameraEvent) |
| | | global.viewer.on(global.DC.SceneEventType.CAMERA_CHANGED, that.mapCameraEvent) |
| | | // global.eagleViewer.on(global.DC.SceneEventType.CAMERA_CHANGED, that.smallMapCameraEvent) |
| | | } |
| | | } |
| | |
| | | } |
| | | }) |
| | | |
| | | 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: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | } |
| | | if (idlerFlag) { // 下 |
| | | if (height > 810) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 950 |
| | | ), |
| | | 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 && height <= 250) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 200 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | } |
| | | if (height > 660) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 800 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | return |
| | | } |
| | | |
| | | 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, |
| | | 300 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | } |
| | | if (height > 510) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 650 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | } |
| | | } else { // 上 |
| | | if (height < 640) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 500 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | return |
| | | } |
| | | |
| | | if (height > 350) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 400 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | if (height < 790) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 650 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | return |
| | | } |
| | | |
| | | if (height < 940) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 800 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | |
| | |
| | | } |
| | | }) |
| | | |
| | | if (height < 1150) { |
| | | global.eagleViewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.eagleViewer.camera.positionCartographic.longitude, |
| | | global.eagleViewer.camera.positionCartographic.latitude, |
| | | 1100 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | } |
| | | if (idlerFlag) { // 下 |
| | | if (height > 1810) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 1950 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | return |
| | | } |
| | | |
| | | if (height > 1150 && height <= 1250) { |
| | | global.eagleViewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.eagleViewer.camera.positionCartographic.longitude, |
| | | global.eagleViewer.camera.positionCartographic.latitude, |
| | | 1200 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | } |
| | | if (height > 1660) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 1800 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | return |
| | | } |
| | | |
| | | if (height > 1250 && height <= 1350) { |
| | | global.eagleViewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.eagleViewer.camera.positionCartographic.longitude, |
| | | global.eagleViewer.camera.positionCartographic.latitude, |
| | | 1300 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | } |
| | | if (height > 1510) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 1650 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | } |
| | | } else { // 上 |
| | | if (height < 1640) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 1500 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | return |
| | | } |
| | | |
| | | if (height > 1350) { |
| | | global.eagleViewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.eagleViewer.camera.positionCartographic.longitude, |
| | | global.eagleViewer.camera.positionCartographic.latitude, |
| | | 1400 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | if (height < 1790) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 1650 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | return |
| | | } |
| | | |
| | | if (height < 1940) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 1800 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | |
| | |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromDegrees( |
| | | that.mapCenter[0], |
| | | that.mapCenter[1], |
| | | 400.0 |
| | | 950.0 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromDegrees( |
| | | that.mapCenter[0], |
| | | that.mapCenter[1], |
| | | 1400.0 |
| | | 1950.0 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | } |
| | | }) |
| | | // 最小 |
| | | global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 100 |
| | | global.eagleViewer.scene.screenSpaceCameraController.minimumZoomDistance = 1100 |
| | | global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 500 |
| | | global.eagleViewer.scene.screenSpaceCameraController.minimumZoomDistance = 1500 |
| | | // 最大 |
| | | global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 400 |
| | | global.eagleViewer.scene.screenSpaceCameraController.maximumZoomDistance = 1400 |
| | | global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 950 |
| | | global.eagleViewer.scene.screenSpaceCameraController.maximumZoomDistance = 1950 |
| | | // 视角旋转 |
| | | global.viewer.scene.screenSpaceCameraController.enableTilt = false |
| | | global.eagleViewer.scene.screenSpaceCameraController.enableTilt = false |