remove all markers from clusterMarkers in MarkerLayer.clear()

This commit is contained in:
Hugh 2020-05-28 17:36:53 +08:00
parent 83d803b08d
commit 31ac9be8d3
1 changed files with 4 additions and 0 deletions

View File

@ -112,8 +112,12 @@ export default class MarkerLayer extends EventEmitter {
this.markers.forEach((marker: IMarker) => {
marker.remove();
});
this.clusterMarkers.forEach((clusterMarker: IMarker) => {
clusterMarker.remove();
});
this.mapsService.off('camerachange', this.update);
this.markers = [];
this.clusterMarkers = [];
}
public destroy() {