mirror of https://gitee.com/antv-l7/antv-l7
remove all markers from clusterMarkers in MarkerLayer.clear()
This commit is contained in:
parent
83d803b08d
commit
31ac9be8d3
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue