Skip to content
This repository was archived by the owner on Sep 11, 2026. It is now read-only.

feat: map download with resume, update checking, and integrity verification - #101

Merged
teal-bauer merged 2 commits into
mainfrom
feat/map-download
Mar 12, 2026
Merged

teal-bauer merged 2 commits into
mainfrom
feat/map-download

Conversation

@teal-bauer

@teal-bauer teal-bauer commented Mar 12, 2026

Copy link
Copy Markdown
Member

Adds map downloading to the navigation setup screen. When maps are missing or outdated, the user can download display tiles and Valhalla routing tiles for their current region. The region is resolved from the current GPS position via Nominatim reverse geocoding.

Downloads are resumable: files are written with a .part suffix and HTTP Range requests are used to continue interrupted transfers. Each file is verified with SHA256 against the digest published in the GitHub release. Installed region, digests, and timestamps are persisted in metadata.json (via MapMetadata), which is checked on screen open to detect available updates. A progress bar tracks total bytes across both tile types, and available disk space is checked before starting.

Test plan

  • Fresh download: remove map files, open navigation setup, download Bremen (~33MB)
  • Resume: start Bayern download, kill app mid-download, reopen, verify it continues from the partial file
  • Update check: download maps, edit metadata.json digest, reopen screen, verify update button appears
  • Region change: partially download one region, trigger download of another, verify old partials are removed
  • Integrity: corrupt a .part file, verify SHA256 mismatch is caught and file is deleted
  • Disk space: verify error is shown when there is not enough space

- Resume partial downloads via HTTP Range headers (survives app restarts)
- Check for map updates on NavigationSetupScreen open (digest comparison)
- SHA256 integrity verification against GitHub release digests
- Byte-weighted progress with MB display across display + valhalla tiles
- Disk space check before download
- Track installed map metadata in metadata.json
- Fix valhalla: use tar directly (no extraction), correct service name
- Remove nonexistent mbtileserver restart
@teal-bauer
teal-bauer merged commit 64bfde9 into main Mar 12, 2026
5 of 6 checks passed
@teal-bauer
teal-bauer deleted the feat/map-download branch March 12, 2026 18:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant