From dd8e9dd6c63c23101f6dfa0f80fd3789a9add2ad Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 31 Dec 2021 11:17:13 +0800
Subject: [PATCH] +2.5d 以及3d 应用 视角固定

---
 src/components/mobileLeftNav/index.vue |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/components/mobileLeftNav/index.vue b/src/components/mobileLeftNav/index.vue
index 5f84749..4b94b26 100644
--- a/src/components/mobileLeftNav/index.vue
+++ b/src/components/mobileLeftNav/index.vue
@@ -45,7 +45,7 @@
     },
   },
   computed: {
-    ...mapGetters(["iconHide"]),
+    ...mapGetters(["iconHide", "dimensionData"]),
   },
   data() {
     return {
@@ -198,16 +198,21 @@
       }
     },
     flyTo(item) {
+      let that = this;
       let posi = this[item.layer].positions[0];
       // console.log(posi);
+      let lntLat =
+        that.dimensionData.pitch == -45
+          ? [posi.lng + 0.00917, posi.lat - 0.0188, 2100]
+          : [posi.lng + 0.00917, posi.lat - 0.0038, 2400];
       this.$store.dispatch("mapFlyTo", {
         //飞入
-        lntLat: [posi.lng + 0.00917, posi.lat - 0.0188, 2100],
+        lntLat: lntLat,
         // lntLat: [posi.lng + 0.01187, posi.lat - 0.0308, 4000],
         // lntLat: [121.50492752204283, 31.21567802276832, 2530],
-        heading: 0,
-        pitch: -45,
-        roll: 0,
+        heading: that.dimensionData.heading,
+        pitch: that.dimensionData.pitch,
+        roll: that.dimensionData.roll,
         noOpen: true,
       });
     },

--
Gitblit v1.9.3