maxiaoxiao 10 ماه پیش
والد
کامیت
8a3714682e
1فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 7 1
      src/views/cockpit/common/VectorSpace/BoxCommonVector.vue

+ 7 - 1
src/views/cockpit/common/VectorSpace/BoxCommonVector.vue

@@ -372,7 +372,13 @@ export default {
         } else {
         } else {
           // this.addpolygon(item);
           // this.addpolygon(item);
           this.tempdataLayerId = "h_" + item.index;
           this.tempdataLayerId = "h_" + item.index;
-          this.loadGeoJSON(item.geom, "h_" + item.index, "#ff0000");
+          if (layerSources["h_" + item.index]) {
+            viewer.flyTo(layerSources["h_" + item.index], {
+              offset: new Cesium.HeadingPitchRange(0, -45),
+            });
+          } else {
+            this.loadGeoJSON(item.geom, "h_" + item.index, "#ff0000");
+          }
         }
         }
       }
       }
       store.setVectordataid(item.dataid);
       store.setVectordataid(item.dataid);