Repository navigation
Conversation
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. This provider keeps its own StrategyMarkerController instead of StrategyMarkerManager, so it implements clearMarkers() itself the same way (cancel the per-marker subscriptions, forget the last sent states, then controller.clear()).
This was referenced Nov 8, 2026
Open
This was referenced Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
なぜ
clearOverlays()は、各プロバイダが自分で持つコントローラ(マーカー・ポリゴンなど)しか clear していませんでした。クラスタリングなどの拡張が登録する Strategy のコントローラ(StrategyMarkerController)は対象外で、clearOverlays()の後もクラスタのマーカーが地図に残っていました。何を変えたか
clearOverlays()の最後でMapServiceRegistry.clearMarkerRendering()(ios-sdk-core の同名 PR で追加)を呼びます。このプロバイダは
StrategyMarkerManagerを使わず、自前のStrategyMarkerControllerを持っています。そのためclearMarkers()を自分で実装しました(マーカーごとの購読を外し、最後に送った state を忘れてから controller.clear())。中身は core と同じ考え方です。ios-sdk-core 側で
MarkerRenderingSupport.clearMarkers()は既定実装なしの必須要件になります(外部の準拠型はソース互換が壊れます。承認済み)。検証
2026-11-08 に develop(fix/mapview-teardown、fix/geodesic-polygon-fill、fix/clear-followups、refactor/polygon-controller などのマージ後)の上に載せ直してから確かめています。
MarkerRenderingClearTestsを含む。clearMarkers()が何もしないと落ちることを確認済み)。api-surface は追加のみ。clearOverlays()が strategy まで届く経路を、develop の teardown 後のコードで読み直しました(controller → clearOverlaysHandler(MapHost / Coordinator)→ 各コントローラの clear →clearMarkerRendering()。ArcGIS は 3D/2D の controller から、Longdo は OverlayBinding から、OMM はstrategyManager.clearMarkers()を直接)。素通りする経路はありませんでした。fix/overlay-stacking-orderを合わせたアプリを MapLibre / MapKit で動かし、clearOverlays の後に Strategy のマーカー(MarkerClusterGroup 経由)も消えることを確かめました。前回(載せ直す前)は全プロバイダで撮っています。確認できていないもの
.iOS(.v17)にしてビルドと api を確かめました。StrategyMarkerManager.clear()(disconnect)では、GL 以外のプロバイダでネイティブのマーカーが残ります。関連 PR(
fix/clear-strategyの一式)マージの順番:
fix/overlay-stacking-orderの PR 一式とは衝突しません(git merge-treeで確認済み)。順番は clear-strategy → stacking を想定しています。