Repository navigation
feat: draw POIs outside the old map on the background map - #146
Merged
Merged
Conversation
POIs whose position falls outside the front old map are now drawn on the marker layer of the background map (or on the front layer when the front map is mercator-based), instead of being dropped. - Classification is done once per POI (classifyMarker) and both marker layers are replaced in one synchronous step, so neither layer is briefly empty while switching maps. - Clicks fall through to background pins only where the old map does not cover the point. - While an outside POI is selected the view centres on it and the pull-back to the map edge is suspended; unselecting pulls back to the nearest edge. GPS updates do not move the view during that time. - New boolean attribute hide-outside-pois (property hideOutsidePois, legacy appOption.hideOutsidePois) turns the behaviour off. - No new MaplatApp.prototype methods; the logic lives in a separate module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the map is switched while an outside POI is selected and the converted centre lands inside the new map, the pending flag was never set, so the outside-selection state stayed and kept suspending the pull-back and GPS moves. The redraw now settles the selection whenever the drawn selected POI is the one held as the outside selection, regardless of the pending flag, and leaves it alone when the ids differ. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Redraws unrelated to the selection (changing hide-outside-pois, adding a marker, toggling layers) re-settled the outside selection and moved the view back to the POI even after the user had panned away. A redraw now recentres only while the selection is still waiting for its first classification; otherwise it just updates the stored position, or drops the outside state when the POI has become inside. Selecting a POI still always centres on it, and switching maps marks the selection as pending so the view follows the POI on the new map as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kochizufan
force-pushed
the
dec26/m13-t1-outside-pois
branch
from
October 28, 2026 13:01
d15b97c to
50bcc99
Compare
kochizufan
marked this pull request as ready for review
October 28, 2026 13:08
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.
概要
古地図の紙の外にある POI を、これまでのように捨てずに背面の地理の地図へ立てるようにしました。
marker層にメルカトルの座標で描きます。前面が TMS・envelopeを持つ基本地図のときは前面のmarker層に描きます。x・y(画素)で与えた POI と、背面の無い古地図(overlay偽)では今までどおり描きません。見た目は範囲内と同じです。redrawMarkersは全件の判定を先に済ませ、前面と背面の層を 1 つの同期の区間で入れ替えます(地図の切り替えの途中で片方だけ空になる時間がありません)。clickMapになります)。clickMarker・clickMarkersの形は前面と同じです。selectMarkerすると中心がそのピンへ寄り、outOfMapは出ません。選んでいる間は紙の内側への引き戻しと GPS による視点の移動を止めます。unselectMarkerで紙のいちばん近い縁へ戻ります(外→外・外→内の選び直しでは縁を挟みません)。hide-outside-pois(プロパティhideOutsidePois・旧appOption.hideOutsidePois。起動後も変更可)で止められます。MaplatApp.prototypeにメソッドを足していません(処理はsrc/outside_pois.ts)。spec/legacy-api-surface.spec.tsは変更なしで緑です。確かめたこと
pnpm exec vitest run: 44 files / 666 passed / 1 skippedpnpm run typecheck: 緑node_modules/.bin/eslint src spec: 0 errors(既存の警告 2 件)pnpm exec playwright test --config=playwright-ci.config.ts: 72 passed(新しいe2e/outside-pois.spec.tsの 10 件を含む。背面が MapLibre のときもピンが描かれ押せることを含む)e2e/wc-element.playwright.config.ts: 3 passed(適合検査が新しい属性も回す)?region=tatebayashiの節「範囲外の POI」)を実際のブラウザで操作し、背面のピン・選択と引き戻し・紙に覆われたピンが押せないことを目で確かめました既存のテストの変更
spec/nov26-m4-t9-marker-redraw.spec.ts: 描き直しの形が変わったため観測点を替えました(テストの名前と件数 8 は同じ。直列化・最新の 1 件の保留・選択中を最後に描くことを測る)spec/element.spec.ts:observedAttributesにhide-outside-poisspec/element-real-core.spec.ts: 2 件を足しただけdist/はtrain/2026-12の先端に載せ直した後にpnpm run buildで作り直し、最後のbuild: rebuild distの commit に入れました。🤖 Generated with Claude Code