Skip to content

Clear ground images and raster layers in clearOverlays() too - #13

Merged
wf9a5m75 merged 1 commit into
developfrom
fix/clear-followups
Nov 8, 2026
Merged

wf9a5m75 merged 1 commit into
developfrom
fix/clear-followups

Conversation

@wf9a5m75

@wf9a5m75 wf9a5m75 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

なぜ

TomTomMapViewController.clearOverlays() が GroundImage とラスターのコントローラを clear していなかったので、clearOverlays() の後も GroundImage とラスターが地図に残っていました(android-for-mapbox#22 で直した Mapbox のサークルと同じ種類の漏れです)。

何を変えたか

  • clearOverlays() で GroundImage を clear するようにしました。
  • TomTom には RasterLayerController が無いので、公開 API の RasterLayer として足したもの(publicRasterLayerIds)を外す形にしました。マーカータイルなど、外から mount したものは持ち主が外すので触っていません。

3 プラットフォームの全プロバイダの clearOverlays() を洗い出し、漏れが見つかったのはこの TomTom と android-for-maptiler の 2 本だけでした。

検証

タブレット(HA26Z6JL)の検証用ページで「追加 → 更新 → 一部削除 → 戻す → clearOverlays() → その場で書き換え → 送り直す」を撮りました。直す前はラスターが clear 後も残り、直した後は消え、送り直すと戻ります。実機の地図オブジェクトが要るため、単体テストは足していません。

既知の別件(この PR では直していません): TomTom のラスターがポリライン・GroundImage を覆う重なり順の問題は、重なり順をそろえる別の変更で扱います。

関連 PR(fix/clear-followups の一式)

それぞれ独立していて、マージの順番の制約はありません(web の変更は js-sdk-core の新しい版を必要としません)。

clearOverlays() cleared markers, polylines, polygons and circles but not
the ground image controller, and nothing removed the raster layers, so
both stayed on the map (seen on the tablet: the relief raster still
covered the map after clearOverlays()). It is the same kind of gap as
the Mapbox circles fixed in "Clear circles in clearOverlays() too".

TomTom has no RasterLayerController (rasters are folded into the
composed style), so the equivalent of rasterLayerController.clear() is
done here: the layers added through the public RasterLayer overlay
(publicRasterLayerIds) are removed. Rasters mounted from outside the
content, such as marker tiles, are left to their owners.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant