feat(mobile): show a full-screen map on the Map tab #148
No reviewers
Labels
No labels
dependencies
major
security-pin
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
trails-cool/trails!148
Loading…
Reference in a new issue
No description provided.
Delete branch "mobile-full-screen-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?
The Map tab was a placeholder rendering the word "Map" centred on a blank screen. It now renders a MapLibre map over OpenStreetMap raster tiles.
What changed
StyleSheet.absoluteFill, so the map runs under the status bar and tab bar. Only the attribution is inset out of their way, via safe-area insets.RouteMapfalls back to when it has no geometry to fit.RouteMapintolib/map/osm-style.tsso the app's two maps cannot drift apart. It carries the attribution string the OSM tile usage policy requires.RouteMap's!Mapguard, which renders a placeholder when the native module isn't linked (e.g. under Expo Go).Deliberately not included
expo-locationis already a dependency, but it's a new data-collection surface needing a privacy manifest entry. Worth a follow-up.useTranslationusage today, so this matches the surrounding code rather than wiring up react-i18next here. Two strings are involved (fallback text, attribution).Tests
app/__tests__/map-screen.test.tsx— 4 tests covering the OSM style, the full-bleed layout, the default camera, the attribution, and the unlinked-module fallback.pnpm typecheck14/14,pnpm test12/12,pnpm lint14/14 — verified standalone onmain, so this is independent of #147.Note on running it
The app cannot actually boot until #147 lands (react/react-native-renderer mismatch). This PR's own checks pass regardless — jest never reaches the native renderer check — but to see the map on a device, merge #147 first.
Verified on an Android emulator: tiles render edge to edge with the attribution clear of the tab bar.
🤖 Generated with Claude Code