浏览代码

上图修改

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 {
           // 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);