Quellcode durchsuchen

天地图引入

Hwf vor 7 Monaten
Ursprung
Commit
5e30ac1c16
1 geänderte Dateien mit 2 neuen und 3 gelöschten Zeilen
  1. 2 3
      src/utils/olMap/olMap.ts

+ 2 - 3
src/utils/olMap/olMap.ts

@@ -146,6 +146,7 @@ export class olMap {
           options.onMarkerClick(extData);
         } else {
           // 聚合要素
+          this.select.getFeatures().clear();
           const currentZoom = this.map.getView().getZoom();
           this.map.getView().setZoom(currentZoom + 1);
           const points = [];
@@ -160,8 +161,6 @@ export class olMap {
           this.map.getView().setCenter(newFeature.geometry.coordinates);
           event.selected = [];
         }
-      } else {
-
       }
     });
   }
@@ -434,7 +433,7 @@ export class olMap {
     this.map.removeOverlay(this.infoWindow);
     this.infoWindow = null;
     if (!!flag && this.select) {
-      this.select.clear();
+      this.select.getFeatures().clear();
     }
   }
   /**