feat(android): Phase 3 map — clustered viewport with scope chips #1126
Loading…
Reference in a new issue
No description provided.
Delete branch "ux-android-map"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Spec 055 T009 — the KARTE tab: an osmdroid map driven entirely by the server's map API.
{z}/{x}/{y}template directly; no provider is hardcoded — ADR 0018).GET /api/map/viewport,/api/map/bounds,/api/map/tile-provider+ DTOs tolerant of unknown keys; fakes gain gated viewport responses.satelliteTileUrlTemplate./api/map/boundspadded ~10% (floor span so one pin doesn't over-zoom), else world view. Re-entering the tab restores the last camera box from the app-scoped ViewModel.attributionandprivacyDisclosure.nav_karte= Karte / Kort / Map.Tile-provider findings
GET /api/map/tile-providerreturnsmode(external|self_hosted), a single{z}/{x}/{y}template, attribution, optional satellite template/name/attribution,privacyDisclosureandexternalProvider. The client renders tiles only from this answer.markerLimitto 5000 and includes cluster members unless told otherwise; single-marker clusters always carry their marker. Web's display path uses the 5000 default without members; its split-view viewer path uses 240 with members. Android combines display+viewer in one call → 500 as the middle ground (ISSUE-131 notes the count-undercount trade-off).Risks / notes
lintDebug: 18 errors, all pre-existing (ISSUE-119 + plurals) — verified zero new on this branch.Verification
./gradlew :app:testDebugUnitTest :app:assembleDebug→ 331 tests, 0 failures, BUILD SUCCESSFUL (22 new: 17 MapViewModelTest, 5 MapJsonTest).osmdroid 6.1.20 drives the canvas straight from the server's tile-provider template ({z}/{x}/{y}); no provider is hardcoded (ADR 0018), and the © action opens a sheet with the provider's attribution + privacy disclosure. Clusters render as count badges, single markers as pins with a marker card (thumbnail, date, type) whose tap hands the whole viewport's markers to the viewer. MapViewModel (app-scoped, hoisted at the route) owns the 400 ms viewport debounce with job cancellation of in-flight fetches, the bounds-padded first camera, scope chips (Alle/Meine, same idiom as the timeline), satellite toggle, and the saved camera for tab re-entry. 17 ViewModel + 5 JSON tests; the osmdroid surface itself is outside the JVM suite (ISSUE-132). Strings added in de/da/en; nav_karte lands with the tab wiring.Fourth tab between Fotos and Sicherung, wired in the established pattern: MapViewModel hoisted app-scope (reset on session change) so the scope chip, satellite toggle and last camera box survive tab switches, plus the full-bleed mapMedia/{mediaItemId} viewer route reading the viewport's marker list. This commit is deliberately isolated: every route/wiring change lives here.