1
0

2 Revīzijas ba0995f31a ... 4bfe6a1d91

Autors SHA1 Ziņojums Datums
  chc 4bfe6a1d91 Merge branch 'newDp' of http://192.168.2.241:3000/chenlong/xx_sw_dp into newDp 1 nedēļu atpakaļ
  chc fa258c22dd 修改 1 nedēļu atpakaļ
2 mainītis faili ar 13 papildinājumiem un 8 dzēšanām
  1. 9 7
      src/views/map/Map.vue
  2. 4 1
      src/views/map/layerControl/TailBaseLine.vue

+ 9 - 7
src/views/map/Map.vue

@@ -1658,13 +1658,13 @@ export default defineComponent({
       //   }
 
       //控制河流和河流尾迹线
-      if (type && level > 9) {
-      // map.showOverlay('geojson_line_dxh', false);
-      // eventBus.emit('TailBaseLine', false);
-      } else if (type) {
-      map.showOverlay('geojson_line_dxh', true);
-      eventBus.emit('TailBaseLine', true);
-      }
+      // if (type && level > 9) {
+      // // map.showOverlay('geojson_line_dxh', false);
+      // // eventBus.emit('TailBaseLine', false);
+      // } else if (type) {
+      // map.showOverlay('geojson_line_dxh', true);
+      // eventBus.emit('TailBaseLine', true);
+      // }
 
       // //地灾工程文字控制
       // if (level > 13) {
@@ -1772,6 +1772,8 @@ export default defineComponent({
     },
 
     addHL() {
+      map.showOverlay('geojson_line_dxh', true);
+      eventBus.emit('TailBaseLine', true);
       // const geo = new TFMap.GeoPolyline([dxh], 5, 'rgba(11,161,236,1)');
       // geo.setClassify('geojson_line_dxh');
       // map.addOverlay(geo);

+ 4 - 1
src/views/map/layerControl/TailBaseLine.vue

@@ -21,6 +21,7 @@ export default {
     let map = null;
     let roloadData = null;
     let trailData = null;
+    let trailData2 = null;
     let checkValue = ref(true);
     // getData();
     // const ybjJsonTemp=ybjJson;
@@ -65,7 +66,9 @@ export default {
       }
       if (trailData) {
         map.viewer.dataSources.remove(trailData);
+        map.viewer.dataSources.remove(trailData2);
         trailData = null;
+        trailData2 = null;
       }
     }
 
@@ -115,7 +118,7 @@ export default {
         clampToGround: true, //贴地设置
       }); //geojson面数据
       promise3.then(function (dataSource) {
-        trailData = dataSource;
+        trailData2 = dataSource;
         viewer.dataSources.add(dataSource);
         var entities = dataSource.entities.values;
         for (var o = 0; o < entities.length; o++) {