From 398a85054f8dbccba416b4bdb820e671e8fca04e Mon Sep 17 00:00:00 2001 From: Masashi Katsumata Date: Sat, 7 Nov 2026 23:30:17 -0800 Subject: [PATCH 1/2] Template: clear registered strategy markers in clearOverlays() The template's clearOverlays() goes through BaseMapViewController.clearOverlayControllers() like the providers, and its conformance test now runs checkClearOverlaysReachesExtensions(), which fails on the old clearOverlays() (extension marker controller cleared 0 times) and passes now. Needs the js-sdk-core change on fix/clear-strategy. --- .../src/TemplateMapViewController.ts | 14 ++++++++------ .../test/TemplateDriverConformance.test.mjs | 10 ++++++++++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/react-for-template/src/TemplateMapViewController.ts b/react-for-template/src/TemplateMapViewController.ts index 6009e9d..fcbce32 100644 --- a/react-for-template/src/TemplateMapViewController.ts +++ b/react-for-template/src/TemplateMapViewController.ts @@ -193,12 +193,14 @@ export class TemplateMapViewController extends BaseMapViewController implements } async clearOverlays(): Promise { - await this.markerController.clear(); - await this.circleController.clear(); - await this.polylineController.clear(); - await this.polygonController.clear(); - await this.groundImageController.clear(); - await this.rasterLayerController.clear(); + await this.clearOverlayControllers([ + this.markerController, + this.circleController, + this.polylineController, + this.polygonController, + this.groundImageController, + this.rasterLayerController, + ]); } /** 地図の破棄。登録済みコントローラの後始末はコアがやる。 */ diff --git a/react-for-template/test/TemplateDriverConformance.test.mjs b/react-for-template/test/TemplateDriverConformance.test.mjs index 7aa7abe..a17105f 100644 --- a/react-for-template/test/TemplateDriverConformance.test.mjs +++ b/react-for-template/test/TemplateDriverConformance.test.mjs @@ -33,6 +33,16 @@ test('every overlay kind is reachable from the Capable facade and the cascade', MapDriverConformance.checkOverlaySlots(controller.overlayControllers); }); +/** + * `clearOverlays()` は自分の 6 つだけでなく、拡張が登録したマーカーのコントローラ + * (クラスタリングの `StrategyMarkerController` など)も clear すること。 + * `clearOverlayControllers()` を通さないと、ここで落ちる。 + */ +test('clearOverlays() reaches the marker controllers extensions register', async () => { + const controller = new TemplateMapViewController(new TemplateMap()); + await MapDriverConformance.checkClearOverlaysReachesExtensions(controller); +}); + test('zoom converter round-trips, is monotonic and clamps', () => { const controller = new TemplateMapViewController(new TemplateMap()); MapDriverConformance.checkZoomConverter(controller.zoomConverter); From d63d80ea5c3e075f661377577afc31c021936e61 Mon Sep 17 00:00:00 2001 From: Masashi Katsumata Date: Sun, 8 Nov 2026 09:53:20 -0800 Subject: [PATCH 2/2] Point js-sdk-core at develop, which has clearOverlayControllers The template now calls BaseMapViewController.clearOverlayControllers and its conformance test runs checkClearOverlaysReachesExtensions; both landed in js-sdk-core with MapConductor/js-sdk-core#29. --- js-sdk-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js-sdk-core b/js-sdk-core index 4d07828..282b8fb 160000 --- a/js-sdk-core +++ b/js-sdk-core @@ -1 +1 @@ -Subproject commit 4d0782848b6b0898378319cc28d15f70a063d3b0 +Subproject commit 282b8fba6bdfbb4c06527fc8a46cd475318b73f1