From a2df9a29362e71cb49131cc4fe568d99f22b23f9 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Tue, 04 Jan 2022 16:01:07 +0800
Subject: [PATCH] 部分更改

---
 src/components/mobilemap/index.vue |   39 +++++++++++++++++++++++++++++++++------
 1 files changed, 33 insertions(+), 6 deletions(-)

diff --git a/src/components/mobilemap/index.vue b/src/components/mobilemap/index.vue
index 9e5bf56..32a9a11 100644
--- a/src/components/mobilemap/index.vue
+++ b/src/components/mobilemap/index.vue
@@ -240,6 +240,10 @@
       viewer.on(that.DC.SceneEventType.CAMERA_CHANGED, (e) => {
         //相机移动最后参数
         //控制高度
+        if (that.dimension == "3D") {
+          console.log("3维不做高度限制");
+        }
+        let isSet = that.dimension == "3D" ? false : true;
         const height = Math.ceil(viewer.camera.positionCartographic.height);
         let conBack = (height) => {
           viewer.camera.setView({
@@ -265,10 +269,10 @@
         // if (height > 2000) {
         //   conBack(2000);
         // }
-        if (height < 500) {
+        if (height < 500 && isSet) {
           conBack(500);
         }
-        if (height > 6000) {
+        if (height > 6000 && isSet) {
           conBack(6000);
         }
       });
@@ -372,9 +376,7 @@
             introduce: e.layer._id,
           }
         );
-      });
-      //移动事件 高亮
-      tileset.on(that.DC.MouseEventType.MOUSE_MOVE, (e) => {
+        //高亮
         silhouetteBlue.selected = [];
 
         if (that.DC.Namespace.Cesium.defined(highlighted.feature)) {
@@ -398,6 +400,31 @@
           );
         }
       });
+      //移动事件
+      // tileset.on(that.DC.MouseEventType.MOUSE_MOVE, (e) => {
+      //   silhouetteBlue.selected = [];
+
+      //   if (that.DC.Namespace.Cesium.defined(highlighted.feature)) {
+      //     highlighted.feature.color = highlighted.originalColor;
+      //     highlighted.feature = undefined;
+      //   }
+
+      //   if (e.feature !== selected.feature) {
+      //     silhouetteBlue.selected = [e.feature];
+
+      //     highlighted.feature = e.feature;
+
+      //     that.DC.Namespace.Cesium.Color.clone(
+      //       e.feature.color,
+      //       highlighted.originalColor
+      //     );
+      //     e.feature.color = that.DC.Namespace.Cesium.Color.fromBytes(
+      //       155,
+      //       255,
+      //       175
+      //     );
+      //   }
+      // });
       tilesetLayer["changesilhouetteBlue"] = () => {
         silhouetteBlue.selected = [];
       };
@@ -633,7 +660,7 @@
 };
 </script>
 
-<style lang='scss' scope>
+<style lang="scss" scope>
 #mobile-viewer-container {
   width: 100%;
   height: 100%;

--
Gitblit v1.9.3