maxiaoxiao 10 mesi fa
parent
commit
8a3714682e

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

@@ -372,7 +372,13 @@ export default {
         } else {
           // this.addpolygon(item);
           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);