From b41db64b0dc4c5fecb40caf788a1a80e7e4e7eb5 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 31 Dec 2021 15:24:15 +0800
Subject: [PATCH] +
---
src/store/modules/mobile.js | 61 +++++++++++-------------------
1 files changed, 23 insertions(+), 38 deletions(-)
diff --git a/src/store/modules/mobile.js b/src/store/modules/mobile.js
index 1c51a14..8373b0d 100644
--- a/src/store/modules/mobile.js
+++ b/src/store/modules/mobile.js
@@ -95,34 +95,34 @@
MSET_MORENWEIZHI(state, data) {
state.startPointFn = data
},
- // 开关飞入点图标
- MSET_OPENPOINTEL(state, val) {
- if (val) {
- state.pointLayerData.img = state.pointLayerData.checked
- state[state.pointLayerData.layer].show = true
- } else {
- state.pointLayerData.img = state.pointLayerData.normal
- state[state.pointLayerData.layer].show = false
- }
- },
+ // // 开关飞入点图标
+ // MSET_OPENPOINTEL(state, val) {
+ // if (val) {
+ // state.pointLayerData.img = state.pointLayerData.checked
+ // state[state.pointLayerData.layer].show = true
+ // } else {
+ // state.pointLayerData.img = state.pointLayerData.normal
+ // state[state.pointLayerData.layer].show = false
+ // }
+ // },
//切换2D和2.5D
- MSET_DIMENSION(state, data) {
+ MSET_DIMENSION(state, data) {//3d,2.5d转换事件
state.dimension = data;
- if (data == "2D") { // 改数据为3d数据
+ if (data == "3D") { // 改数据为3d数据
state.dimensionData = {// 维度镜头数据
heading: 0,
pitch: -45,
roll: 0
};
// console.log(1321)
- state.wallLayer.show = false;
+ state.wallLayer.show = false; //关闭瀑布 以及2.5d图形贴片
state.mviewer.imageryLayers.remove(state.newLayer);
state.newLayer = null;
// state.silhouetteBlue.selected = []
- state.tilesetLayer.changesilhouetteBlue();
+ state.tilesetLayer.changesilhouetteBlue(); //清空silhouetteBlue.selected = [];
// console.log(state.tileset)
- state.tilesetLayer.show = true;
- state.startPointFn();
+ state.tilesetLayer.show = true; //显示3d图形
+ state.startPointFn();//移动默认视角
// state.mviewer.flyTo(state.tileset);
} else if (data == "2.5D") {
state.dimensionData = {// 维度镜头数据
@@ -130,25 +130,10 @@
pitch: -90,
roll: 0
};
- state.tilesetLayer.show = false
-
- state.newLayer = state.usetowpointfive();
-
- state.wallLayer.show = true
-
- state.startPointFn();
- // state.mviewer.camera.setView({
- // // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
- // // fromDegrees()方法,将经纬度和高程转换为世界坐标
- // destination: global.DC.Namespace.Cesium.Cartesian3.fromDegrees(116.36618337, 27.95911915, 1000.0),
- // orientation: {
- // // 指向
- // heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
- // // 视角
- // pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
- // roll: 0.0
- // }
- // })
+ state.tilesetLayer.show = false//隐藏3d图形
+ state.newLayer = state.usetowpointfive();//添加2.5d图形贴片
+ state.wallLayer.show = true//打开瀑布
+ state.startPointFn();//移动默认视角
}
},
//切换控制
@@ -175,7 +160,7 @@
let clas, Flys;
const nowHeight = Math.ceil(state.mviewer.camera.positionCartographic.height);
console.log(data)
- if (state.dimension == "2D") {
+ if (state.dimension == "3D") {
Flys = [
+data.lntLat[0] + 0.01197,
// +data.lntLat[1] - 0.0001,
@@ -395,7 +380,7 @@
state.mviewer.camera.lookAtTransform(global.DC.Namespace.Cesium.Matrix4.IDENTITY)
// console.log(global.DC.Namespace.Cesium.Matrix4.IDENTITY)
},
- MSET_DIMENSIONS({ state, commit, dispatch }, val) {
+ MSET_DIMENSIONS({ state, commit, dispatch }, val) {//3d,2.5d转换事件
commit("MSET_DIMENSION", val);
//控制高度
const height = Math.ceil(state.mviewer.camera.positionCartographic.height);
@@ -414,7 +399,7 @@
},
});
},
- MSET_GOTOCC({ state, commit, dispatch }, val) {
+ MSET_GOTOCC({ state, commit, dispatch }, val) {//测试移动位置
// commit("MSET_DIMENSION", val);
//控制高度
// const height = Math.ceil(state.mviewer.camera.positionCartographic.height);
--
Gitblit v1.9.3