diff --git a/src/AzureMapsViewController.ts b/src/AzureMapsViewController.ts index bbc4312..aeafdaa 100644 --- a/src/AzureMapsViewController.ts +++ b/src/AzureMapsViewController.ts @@ -280,13 +280,13 @@ export class AzureMapsViewController // --- Lifecycle --- 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, ]); }