Redesign UI as an OsmAnd-style sidebar, add live GNSS position via gpsd

Restructure the map controls from MapLibre corner buttons into a left
sidebar of icons with flyouts/panels (radar, GPX, GNSS), matching
OsmAnd's layout more closely:

- Base map and GPX selection are now full-height side panels docked
  next to the sidebar (not small dropdown flyouts or a right-docked
  panel), opening/closing exclusively via a small shared event bus
  (panels.js) so only one is ever open at a time.
- The GPX panel's upload/new-folder controls are now icon buttons in
  the header instead of an always-visible dropzone and form; dragging
  a GPX file onto the tree, a specific folder, or straight onto the
  map itself all upload it.
- New: Maptool::GpsdClient (lib/maptool/gpsd_client.rb) streams live
  GNSS fixes from a local gpsd daemon over Server-Sent Events
  (/api/gnss/stream) to a marker on the map (public/js/gnss.js) — one
  background gpsd connection shared by every browser tab.
- The online map style (public/js/osmand-style.js) is now styled to
  resemble OsmAnd's own rendering, applied to both the online and
  offline (PMTiles) styles.

Also adds a GeolocateControl (browser geolocation) next to the zoom
controls.
This commit is contained in:
randy committed 2026-08-25 19:39:13 +02:00
1 parent 008e034932
commit 87df90f75c
14 files changed
+939 -200

No files matched your search

+5 -3
View File
@@ -10,9 +10,11 @@ The project's shape is still open — this is the initial scaffold.
== Status
Early scaffold. The web application serves a vector map (MapLibre GL
JS), with an online style and an optional offline style backed by a
local PMTiles file, an animated RainViewer radar overlay, and GPX
upload/display (points and tracks, organized in folders).
JS), styled to resemble https://osmand.net/map[OsmAnd's own map], with
an online style and an optional offline style backed by a local
PMTiles file, an animated RainViewer radar overlay, GPX
upload/display (points and tracks, organized in folders), and a live
position marker from a local GNSS receiver via gpsd.
== Requirements