Bladeren bron

数据查询三角和定位红色图斑清除

maxiaoxiao 10 maanden geleden
bovenliggende
commit
ff093ce17b
1 gewijzigde bestanden met toevoegingen van 5 en 3 verwijderingen
  1. 5 3
      src/components/Query/clickQuery/clickQuery.vue

+ 5 - 3
src/components/Query/clickQuery/clickQuery.vue

@@ -319,7 +319,8 @@ export default {
             points.push(cx);
             points.push(cy);
           }
-          let e = this.dataSourceLayer.entities.add({
+          // let e = this.dataSourceLayer.entities.
+          let e = this.viewer.entities.add({
             polyline: new Cesium.PolylineGraphics({
               positions: Cesium.Cartesian3.fromDegreesArray(points),
               width: 3,
@@ -328,7 +329,7 @@ export default {
             }),
           });
         }
-        this.viewer.flyTo(this.dataSourceLayer);
+        this.viewer.flyTo(e);
       } else {
         this.$message({
           message: "空间范围为空!",
@@ -356,6 +357,7 @@ export default {
       that.activeLayerId = "0";
       that.layerList = [];
       that.layersData = [];
+      this.remove_query_click();
       let scene = viewer.scene;
       that.viewer.entities.removeAll();
       that.dataSourceLayer.entities.removeAll();
@@ -822,7 +824,7 @@ export default {
         case 1: {
           this.mapQuerys("mapLayerQuery"); //图层点击事件
           this.remove_query_click();
-
+          this.viewer.entities.removeAll();
           break;
         }
         case 2: {