From 64527479fcff36949985a3039bfc453827ca1473 Mon Sep 17 00:00:00 2001 From: Masashi Katsumata Date: Sat, 7 Nov 2026 23:30:14 -0800 Subject: [PATCH] Clear registered strategy markers in clearOverlays() clearOverlays() cleared the provider's own six controllers only, so markers drawn through a StrategyMarkerController that an extension registered (MarkerClusterGroup, MarkerRenderingSupport) stayed on the map. It now goes through BaseMapViewController.clearOverlayControllers(), which clears the same six in the same order and then every other registered slotted controller. Needs the js-sdk-core release that adds clearOverlayControllers() (fix/clear-strategy); with the published ^0.3.x core this does not compile. --- src/GoogleMapViewController.ts | 14 ++++++++------ src/GoogleMapViewController2D.ts | 14 ++++++++------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/GoogleMapViewController.ts b/src/GoogleMapViewController.ts index 9abc074..879b739 100644 --- a/src/GoogleMapViewController.ts +++ b/src/GoogleMapViewController.ts @@ -289,12 +289,14 @@ export class GoogleMapViewController // --- Lifecycle --- async clearOverlays(): Promise { - 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, + ]); } /** diff --git a/src/GoogleMapViewController2D.ts b/src/GoogleMapViewController2D.ts index 75a44d3..b35fc82 100644 --- a/src/GoogleMapViewController2D.ts +++ b/src/GoogleMapViewController2D.ts @@ -314,12 +314,14 @@ export class GoogleMapViewController2D // --- Lifecycle --- async clearOverlays(): Promise { - 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, + ]); } /**