彭宇 2 роки тому
батько
коміт
65e690ccae
2 змінених файлів з 5 додано та 6 видалено
  1. 1 2
      src/components/supermap.vue
  2. 4 4
      src/views/forest.vue

+ 1 - 2
src/components/supermap.vue

@@ -584,7 +584,6 @@ export default {
         if (this.isAggregationMyGroup != undefined && this.isAggregationMyGroup != false) {
           this.isAggregationMyGroup.clearLayers()
         }
-        if (this.isAggregationLayers != null && this.isAggregationLayers.length > 0) {
           this.map.removeLayer(this.isAggregationLayers)
           this.isAggregationLayers = []
           this.radiusLayers = []
@@ -598,11 +597,11 @@ export default {
             //最大缩放级别点击聚合图标展开图标
             spiderfyOnMaxZoom: true
           })
-        }
       } else {
         if (this.myGroup != undefined && this.myGroup != false) {
           this.myGroup.clearLayers()
         }
+        this.map.removeLayer(this.layers)
         this.layers = []
       }
     },

+ 4 - 4
src/views/forest.vue

@@ -559,24 +559,24 @@ export default {
             keepBindPopup: false,
             isAggregation: false
           }
-          if (this.eventList.length > 50) {
+          if (this.eventList.length > 200) {
             markersMap.isAggregation = true
           }
           if (this.eventList[i].eventStatusValue == 'forest_event_status_1' && this.eventList[i].urgeCount == 0) {
             markersMap.click = 'showEventDialog'
             markersMap.icon = 'sj-icon-map-xinshangbao'
-            markersMap.isAggregation = false
           }
           if (this.eventList[i].eventStatusValue == 'forest_event_status_1' && this.eventList[i].urgeCount > 0) {
             markersMap.click = 'showEventDialog'
             markersMap.icon = 'sj-icon-map-cuiban'
-            markersMap.isAggregation = false
           } else if (this.eventList[i].eventStatusValue == 'forest_event_status_2') {
             markersMap.click = 'showEventDialog'
             markersMap.icon = 'sj-icon-map-qianshou'
+            markersMap.isAggregation = false
           } else if (this.eventList[i].eventStatusValue == 'forest_event_status_5') {
             markersMap.click = 'showEventDialog'
             markersMap.icon = 'sj-icon-map-banjie'
+            markersMap.isAggregation = false
           } else if (this.eventList[i].eventStatusValue == 'forest_event_status_6') {
             markersMap.click = 'showEventDialog'
             markersMap.icon = 'sj-icon-map-guidang'
@@ -941,7 +941,7 @@ export default {
             } else if (this.eventList[i].eventStatusValue == 'forest_event_status_6') {
               markersMap.click = 'showEventDialog'
               markersMap.icon = 'sj-icon-map-guidang'
-              markersMap.isAggregation = false
+              markersMap.isAggregation = true
             }
             markersMap.parameter = this.eventList[i].eventCode
             markersMap.lng = this.eventList[i].longitude