Merge pull request #392 from godblesshugh/master

fix(component): remove all markers from clusterMarkers in MarkerLayer.clear()
This commit is contained in:
@thinkinggis 2020-05-29 23:27:12 +08:00 committed by GitHub
commit 7e93570b07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) => { this.markers.forEach((marker: IMarker) => {
marker.remove(); marker.remove();
}); });
this.clusterMarkers.forEach((clusterMarker: IMarker) => {
clusterMarker.remove();
});
this.mapsService.off('camerachange', this.update); this.mapsService.off('camerachange', this.update);
this.markers = []; this.markers = [];
this.clusterMarkers = [];
} }
public destroy() { public destroy() {