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 | 34 ++++++++++++++++++++++++++++++----
1 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/src/components/mobilemap/index.vue b/src/components/mobilemap/index.vue
index e8486dd..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,10 +226,35 @@
}
);
tilesetLayer.addOverlay(tileset);
- setTimeout((res) => {
- viewer.flyTo(tileset);
- }, 2500);
//精细模型↑
+
+ 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");
@@ -292,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