diff --git a/src/LeafletMapViewController.ts b/src/LeafletMapViewController.ts index 2c90e40..a1ecfc8 100644 --- a/src/LeafletMapViewController.ts +++ b/src/LeafletMapViewController.ts @@ -315,13 +315,13 @@ export class LeafletMapViewController getNonTiledMarkerStates(): MarkerState[] { return this.markerController.getNonTiledMarkerStates(); } async clearOverlays(): Promise { - await Promise.all([ - this.markerController.clear(), - this.circleController.clear(), - this.polylineController.clear(), - this.polygonController.clear(), - this.groundImageController.clear(), - this.rasterLayerController.clear(), + await this.clearOverlayControllers([ + this.markerController, + this.circleController, + this.polylineController, + this.polygonController, + this.groundImageController, + this.rasterLayerController, ]); }