| | |
| | | drawALineLayerMany: null, //活动路线图层 |
| | | drawAPointLayerMany: null, //活动点图层 |
| | | isOpenDrawALineMany: null, //是否开启活动 |
| | | seeRight: true, //右侧控制栏显影 |
| | | }, |
| | | mutations: { |
| | | MSET_VIEWER(state, viewer) { |
| | |
| | | state.startPointFn(); //移动默认视角 |
| | | state.areaLayer.show = true; //绿布 |
| | | //2.5D视角限制 |
| | | state.mviewer.scene.screenSpaceCameraController.minimumZoomDistance = 190; |
| | | state.mviewer.scene.screenSpaceCameraController.minimumZoomDistance = 80; |
| | | // 最大 |
| | | state.mviewer.scene.screenSpaceCameraController.maximumZoomDistance = 400; |
| | | state.mviewer.scene.screenSpaceCameraController.maximumZoomDistance = 200; |
| | | // 设置相机缩小时的速率 |
| | | state.mviewer.scene.screenSpaceCameraController._minimumZoomRate = 2000; |
| | | // 设置相机放大时的速率 |
| | |
| | | state.select.overlay = data[0]; |
| | | state.select.color = data[1]; |
| | | }, |
| | | SET_SeeAndNotSee(state, data) { |
| | | state.seeRight = data; |
| | | }, |
| | | }, |
| | | actions: { |
| | | MSET_CREADE({ state, commit, dispatch }) { |
| | |
| | | // console.log(state.dimension); |
| | | if (state.dimension != "2.5D") { |
| | | // if (true) { |
| | | // if (true) { |
| | | dispatch("mapFlyTo", { |
| | | //飞入 |
| | | lntLat: [Position.lng, Position.lat, Position.alt], |
| | |
| | | roll: Position.roll, |
| | | }); |
| | | } else { |
| | | state.mviewer.camera.setView({ |
| | | // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州 |
| | | // fromDegrees()方法,将经纬度和高程转换为世界坐标 |
| | | destination: new global.DC.Namespace.Cesium.Cartesian3.fromDegrees( |
| | | // 114.0351, |
| | | // 27.6314, |
| | | // 200.0 |
| | | Position.lng - 0.012, |
| | | Position.lat, |
| | | Position.alt || 15000.0 |
| | | ), |
| | | orientation: { |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians( |
| | | Position.heading |
| | | ), |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(Position.pitch), |
| | | // heading: data.heading, |
| | | // pitch: data.pitch, |
| | | roll: Position.roll, |
| | | }, |
| | | dispatch("mapFlyTo", { |
| | | //飞入 |
| | | lntLat: [Position.lng, +Position.lat - 0.0003, 160], |
| | | heading: Position.heading, |
| | | pitch: Position.pitch, |
| | | roll: Position.roll, |
| | | }); |
| | | commit("MSET_MOBILEWINDOWSHIDE", false); // 显示弹窗 |
| | | // state.mviewer.camera.setView({ |
| | | // // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州 |
| | | // // fromDegrees()方法,将经纬度和高程转换为世界坐标 |
| | | // destination: new global.DC.Namespace.Cesium.Cartesian3.fromDegrees( |
| | | // // 114.0351, |
| | | // // 27.6314, |
| | | // // 200.0 |
| | | // Position.lng - 0.012, |
| | | // Position.lat - 0.0003, |
| | | // Position.alt || 15000.0 |
| | | // ), |
| | | // orientation: { |
| | | // heading: global.DC.Namespace.Cesium.Math.toRadians( |
| | | // Position.heading |
| | | // ), |
| | | // pitch: global.DC.Namespace.Cesium.Math.toRadians(Position.pitch), |
| | | // // heading: data.heading, |
| | | // // pitch: data.pitch, |
| | | // roll: Position.roll, |
| | | // }, |
| | | // }); |
| | | // commit("MSET_MOBILEWINDOWSHIDE", false); // 显示弹窗 |
| | | } |
| | | // }) |
| | | commit("MSET_POPUPDOM", popupsDom); |
| | |
| | | // 自定义回调 |
| | | setTimeout(() => { |
| | | data.fn(); |
| | | }, 500); |
| | | }, 200); |
| | | } |
| | | if (!data.noOpen) { |
| | | setTimeout(() => { |