From 84e172065fcc7fe6772d031c6c262a63e85f8efa Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Mon, 27 Dec 2021 09:31:42 +0800
Subject: [PATCH] +搜索为空return

---
 src/components/mobilemap/index.vue |   46 +++++++++++++++++++++++++++++++++++++---------
 1 files changed, 37 insertions(+), 9 deletions(-)

diff --git a/src/components/mobilemap/index.vue b/src/components/mobilemap/index.vue
index 66d2a9f..83c4716 100644
--- a/src/components/mobilemap/index.vue
+++ b/src/components/mobilemap/index.vue
@@ -138,6 +138,7 @@
       });
       that.$refs.mobileLeftNav.initialize(viewer);
       that.$store.commit("MSET_VIEWER", viewer);
+      // window.mviewer = viewer;
       // that.$store.commit("MSET_DC", DC);
       const popup = viewer.popup;
 
@@ -225,8 +226,35 @@
         }
       );
       tilesetLayer.addOverlay(tileset);
-      viewer.flyTo(tileset);
       //精细模型↑
+
+      setTimeout((res) => {
+        //转圈
+        that.$store.dispatch("mapFlyTo", {
+          lntLat: [111.25036579, 34.83767277, 11443175.85],
+          heading: 0,
+          pitch: -90,
+          roll: 0,
+          noOpen: true,
+          fn: function () {
+            viewer.flyTo(tileset);
+          },
+        });
+
+        // viewer.flyTo(tileset);
+      }, 2500);
+      // let position = Cesium.Cartesian3.fromDegrees(108, 25, 0); //中心点位置
+      // let cameraLimit = new xt3d.CameraDominate.CameraLimit(
+      //   viewer,
+      //   position,
+      //   {
+      //     radius: 2000,
+      //     debugExtent: true,
+      //   }
+      // );
+
+      // const currentViewRect = viewer.camera.computeViewRectangle();//东南西北数据
+      // console.log(currentViewRect, 78);
 
       //瀑布流↓
       const wallLayer = new that.DC.VectorLayer("wallLayer");
@@ -262,13 +290,13 @@
       //瀑布流↑
 
       //飞入起始点
-      that.$store.dispatch("mapFlyTo", {
-        lntLat: [115.87186406, 28.74449337, 1200],
-        heading: 0,
-        pitch: -45,
-        roll: 0,
-        noOpen: true,
-      });
+      // that.$store.dispatch("mapFlyTo", {
+      //   lntLat: [115.87186406, 28.74449337, 1200],
+      //   heading: 0,
+      //   pitch: -45,
+      //   roll: 0,
+      //   noOpen: true,
+      // });
       //地图渲染完成执行srore中MSET_CREADE
       // that.$store.dispatch("MSET_CREADE");
 
@@ -290,7 +318,7 @@
 
       viewer.compass.enable = false;
       viewer.zoomController.enable = true;
-      viewer.locationBar.enable = false;
+      viewer.locationBar.enable = true;
       viewer.distanceLegend.enable = true;
     }
 

--
Gitblit v1.9.3