彭宇 2 роки тому
батько
коміт
610339e02b
1 змінених файлів з 2 додано та 2 видалено
  1. 2 2
      src/components/supermap.vue

+ 2 - 2
src/components/supermap.vue

@@ -617,7 +617,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 = []
@@ -631,11 +630,12 @@ export default {
             //最大缩放级别点击聚合图标展开图标
             spiderfyOnMaxZoom: true
           })
-        }
       } else {
+        debugger
         if (this.myGroup != undefined && this.myGroup != false) {
           this.myGroup.clearLayers()
         }
+        this.map.removeLayer(this.layers)
         this.layers = []
       }
     },