From 5e12fb025b95ff06e693947458c4a9ae2cb92c6b Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sat, 08 Jan 2022 09:39:56 +0800
Subject: [PATCH] +

---
 src/store/modules/mobile.js |   56 ++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 42 insertions(+), 14 deletions(-)

diff --git a/src/store/modules/mobile.js b/src/store/modules/mobile.js
index 14f68a6..ed3cb47 100644
--- a/src/store/modules/mobile.js
+++ b/src/store/modules/mobile.js
@@ -195,11 +195,11 @@
         state.startPointFn(); //移动默认视角
 
         //2.5D视角限制
-        state.mviewer.scene.screenSpaceCameraController.minimumZoomDistance = 200;
+        state.mviewer.scene.screenSpaceCameraController.minimumZoomDistance = 0;
         // 最大
         state.mviewer.scene.screenSpaceCameraController.maximumZoomDistance = 4000;
         // 设置相机缩小时的速率
-        state.mviewer.scene.screenSpaceCameraController._minimumZoomRate = 30000;
+        // state.mviewer.scene.screenSpaceCameraController._minimumZoomRate = 30000;
         // 设置相机放大时的速率
         state.mviewer.scene.screenSpaceCameraController._maximumZoomRate = 5906376272000;
         // 视角平移
@@ -253,15 +253,15 @@
       } else if (state.dimension == "2.5D") {
         Flys = [
           +data.lntLat[0] + 0.01197,
-          +data.lntLat[1] + 0.00045,
+          +data.lntLat[1] + 0.00048,
           // +data.lntLat[1] - 0.0022,
-          nowHeight,
+          // nowHeight,
+          360,
         ];
+        // console.log(nowHeight);
         clas = [
           data.from == "PopupOurOnce" ? +data.lntLat[0] : +data.lntLat[0],
-          data.from == "PopupOurOnce"
-            ? +data.lntLat[1] - 0.00108
-            : +data.lntLat[1],
+          data.from == "PopupOurOnce" ? +data.lntLat[1] : +data.lntLat[1],
           // data.from == 'PopupOurOnce' ? +data.lntLat[1] - 0.00108 : +data.lntLat[1] - 0.00048,
           // data.from == 'PopupOurOnce' ? 0 : 90.648862227
           data.from == "PopupOurOnce" ? 0 : 0,
@@ -321,13 +321,41 @@
         0,
         state.dimensionData.pitch
       );
-      dispatch("mapFlyTo", {
-        //飞入
-        lntLat: [Position.lng, Position.lat, Position.alt],
-        heading: Position.heading,
-        pitch: Position.pitch,
-        roll: Position.roll,
-      });
+      if (state.dimension != "2.5D") {
+        // if (true) {
+        dispatch("mapFlyTo", {
+          //飞入
+          lntLat: [Position.lng, Position.lat, Position.alt],
+          heading: Position.heading,
+          pitch: Position.pitch,
+          roll: Position.roll,
+        });
+      } else {
+        // console.log(17878);
+        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,
+          },
+        });
+
+        !state.MobileWindowsHide || commit("MSET_MOBILEWINDOWSHIDE", false); // 显示弹窗
+      }
       // })
       commit("MSET_POPUPDOM", popupsDom);
     },

--
Gitblit v1.9.3