From fc1680013170203fbfd0c42890ac6411d2713444 Mon Sep 17 00:00:00 2001 From: Masashi Katsumata Date: Sat, 7 Nov 2026 23:10:49 -0800 Subject: [PATCH] Clear strategy-driven markers in clearOverlays() clearOverlays() cleared this provider's own overlay controllers but not the strategy controller behind MarkerRenderingSupport, so markers drawn by clustering (or any other marker-rendering plugin) stayed on the map. It now ends with MapServiceRegistry.clearMarkerRendering() (ios-sdk-core fix/clear-strategy), which reaches the registered support's clearMarkers(): StrategyMarkerController.clear() (onRemove -> strategy.clear() -> onPostProcess), and the next syncMarkers sends the markers again, as the overlay collectors do after a clear. Requires the ios-sdk-core change that adds clearMarkers() to MarkerRenderingSupport. --- Sources/MapConductorForMapKit/MapKitMapView.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/MapConductorForMapKit/MapKitMapView.swift b/Sources/MapConductorForMapKit/MapKitMapView.swift index 9b73bbe..763dedd 100644 --- a/Sources/MapConductorForMapKit/MapKitMapView.swift +++ b/Sources/MapConductorForMapKit/MapKitMapView.swift @@ -326,6 +326,8 @@ private struct MapKitMapViewRepresentable: UIViewRepresentable { await groundImageController?.clear() await circleController?.clear() await rasterLayerController?.clear() + // strategy(クラスタリングなど)が描いたマーカーも消す。 + await state.serviceRegistry.clearMarkerRendering() } func unbind() {