Repository navigation
Conversation
Providers' clearOverlays() cleared their own six controllers only. The StrategyMarkerController that MarkerClusterGroup (and anything built on MarkerRenderingSupport) creates and registers with registerOverlayController() was never cleared, so clustered markers stayed on the map after clearOverlays(). BaseMapViewController.clearOverlayControllers(own) is the one place to call from clearOverlays(): it clears `own` in the order given (what the providers listed before), then every other registered controller that takes part in the overlay slots (has a `kind`), in registration order. Camera-only registrations such as the heatmap's are left alone. OverlayControllerLike gains an optional clear() for this. MapDriverConformance.checkClearOverlaysReachesExtensions() catches a provider that does not route through it, which would otherwise compile and silently keep the markers. ClearOverlaysStrategy.test.mjs fails on the previous core (no such helper; the old provider shape leaves the strategy's markers drawn) and passes now. Public API: additions only (optional clear?() on OverlayControllerLike); the helper and the check are @internal.
This was referenced Nov 8, 2026
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()の後もクラスタのマーカーが地図に残っていました。何を変えたか
BaseMapViewController.clearOverlayControllers(own)(@internal)を足しました。ownに渡したプロバイダ自身のコントローラを渡した順に clear し、続いて登録されている他のコントローラのうちオーバーレイのスロットに参加するもの(kindを持つもの)を登録順に clear します。カメラだけを聞く登録(ヒートマップ)は触りません。OverlayControllerLikeに省略可能なclear?()を足しました(公開 API の追加はこれだけ)。MapDriverConformance.checkClearOverlaysReachesExtensions()(@internal)を足しました。プロバイダがこの経路を通っていないと検出します。通らなくてもコンパイルは通り、マーカーが黙って残るため。ClearOverlaysStrategy.test.mjsを足しました。前の core では落ち、今は通ります。検証
2026-11-08 に develop(fix/mapview-teardown、fix/geodesic-polygon-fill、fix/clear-followups、refactor/polygon-controller などのマージ後)の上に載せ直してから確かめています。
OverlayControllerLike.clear?()の追加のみ。ClearOverlaysStrategy.test.mjsは前の core で落ち、今は通ります。template の conformance テスト(checkClearOverlaysReachesExtensions)も通ります。確認できていないもの
checkClearOverlaysReachesExtensionsが無く落ちます。js-sdk-core の PR のマージと submodule の引き上げの後に通る見込みです。clearOverlayControllers)が要ります。npm 公開と依存の引き上げまでは、公開済みの core に対してビルドできません。関連 PR(
fix/clear-strategyの一式)マージの順番:
fix/overlay-stacking-orderの PR 一式とは衝突しません(git merge-treeで確認済み)。順番は clear-strategy → stacking を想定しています。