| | |
| | | let layerSATtwo = null |
| | | let tcLayer = null |
| | | |
| | | const wallLayer = null |
| | | // const wallLayer = null |
| | | |
| | | export default { |
| | | name: 'dimension', |
| | |
| | | |
| | | // 最小 |
| | | global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 100 |
| | | global.eagleViewer.scene.screenSpaceCameraController.minimumZoomDistance = 1100 |
| | | // 最大 |
| | | global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 400 |
| | | global.eagleViewer.scene.screenSpaceCameraController.maximumZoomDistance = 1400 |
| | | |
| | | // 设置相机缩小时的速率 |
| | | global.viewer.scene.screenSpaceCameraController._minimumZoomRate = 2000 |
| | | // global.eagleViewer.scene.screenSpaceCameraController._minimumZoomRate = 2000 |
| | | // 设置相机放大时的速率 |
| | | global.viewer.scene.screenSpaceCameraController._maximumZoomRate = 5906376272000 |
| | | // global.eagleViewer.scene.screenSpaceCameraController._maximumZoomRate = 5906376272000 |
| | | // 视角平移 |
| | | global.viewer.scene.screenSpaceCameraController.enableRotate = true |
| | | global.eagleViewer.scene.screenSpaceCameraController.enableRotate = true |
| | | // 视角缩放 |
| | | global.viewer.scene.screenSpaceCameraController.enableZoom = true |
| | | global.eagleViewer.scene.screenSpaceCameraController.enableZoom = true |
| | | // 视角旋转 |
| | | global.viewer.scene.screenSpaceCameraController.enableTilt = false |
| | | global.eagleViewer.scene.screenSpaceCameraController.enableTilt = false |
| | | |
| | | that.createdLayers() |
| | | |
| | |
| | | } |
| | | |
| | | global.viewer.on(global.DC.SceneEventType.CAMERA_CHANGED, that.mapCameraEvent) |
| | | global.eagleViewer.on(global.DC.SceneEventType.CAMERA_CHANGED, that.smallMapCameraEvent) |
| | | } |
| | | } |
| | | } |
| | |
| | | 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 |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | smallMapCameraEvent () { |
| | | const height = Math.ceil( |
| | | global.eagleViewer.camera.positionCartographic.height |
| | | ) |
| | | |
| | | global.eagleViewer.camera.setView({ |
| | | 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 (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 > 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 > 1350) { |
| | | global.eagleViewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.eagleViewer.camera.positionCartographic.longitude, |
| | | global.eagleViewer.camera.positionCartographic.latitude, |
| | | 1400 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | |
| | | // 科技感删除 |
| | | removeSAT () { |
| | | global.viewer.remove(layerSat) |
| | | global.viewer.remove(layerSATtwo) |
| | | global.viewer.removeLayer(layerSat) |
| | | global.viewer.removeLayer(layerSATtwo) |
| | | layerSat = null |
| | | layerSATtwo = null |
| | | }, |
| | |
| | | that.createTC() |
| | | global.viewer.off(global.DC.MouseEventType.MOUSE_MOVE, that.mouseMoveEvent) |
| | | global.viewer.off(global.DC.SceneEventType.CAMERA_CHANGED, that.mapCameraEvent) |
| | | global.eagleViewer.off(global.DC.SceneEventType.CAMERA_CHANGED, that.smallMapCameraEvent) |
| | | that.removeLayers() |
| | | global.viewer.imageryLayers.remove(baseMapLayer) |
| | | baseMapLayer = null |
| | |
| | | global.viewer.addLayer(streenMlayer) |
| | | // 最小 |
| | | global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 1.0 |
| | | global.eagleViewer.scene.screenSpaceCameraController.minimumZoomDistance = 1.0 |
| | | // 最大 |
| | | global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = |
| | | Number.POSITIVE_INFINITY |
| | | global.eagleViewer.scene.screenSpaceCameraController.maximumZoomDistance = |
| | | Number.POSITIVE_INFINITY |
| | | // 视角旋转 |
| | | global.viewer.scene.screenSpaceCameraController.enableTilt = true |
| | | global.eagleViewer.scene.screenSpaceCameraController.enableTilt = true |
| | | // 115.877863,28.741661 |
| | | global.viewer.camera.setView({ |
| | | // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州 |
| | |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | |
| | | global.eagleViewer.camera.setView({ |
| | | // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州 |
| | | // fromDegrees()方法,将经纬度和高程转换为世界坐标 |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromDegrees( |
| | | that.mapCenter[0], |
| | | that.mapCenter[1], |
| | | 1220.0 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(-9), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-34.54), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | } else { |
| | | that.btnGroupShow = false |
| | | that.removeSAT() |
| | | that.removeTC() |
| | | global.viewer.on(global.DC.MouseEventType.MOUSE_MOVE, that.mouseMoveEvent) |
| | | global.viewer.on(global.DC.SceneEventType.CAMERA_CHANGED, that.mapCameraEvent) |
| | | global.eagleViewer.on(global.DC.SceneEventType.CAMERA_CHANGED, that.smallMapCameraEvent) |
| | | tileset.off(global.DC.MouseEventType.CLICK, that.tilesetClick) |
| | | tilesetLayer.removeOverlay(tileset) |
| | | tilesetLayer.show = false |
| | |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | |
| | | global.eagleViewer.camera.setView({ |
| | | // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州 |
| | | // fromDegrees()方法,将经纬度和高程转换为世界坐标 |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromDegrees( |
| | | that.mapCenter[0], |
| | | that.mapCenter[1], |
| | | 1400.0 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | // 最小 |
| | | global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 100 |
| | | global.eagleViewer.scene.screenSpaceCameraController.minimumZoomDistance = 1100 |
| | | // 最大 |
| | | global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 400 |
| | | global.eagleViewer.scene.screenSpaceCameraController.maximumZoomDistance = 1400 |
| | | // 视角旋转 |
| | | global.viewer.scene.screenSpaceCameraController.enableTilt = false |
| | | global.eagleViewer.scene.screenSpaceCameraController.enableTilt = false |
| | | } |
| | | } |
| | | } |