Defaults to metric for global audience. Persists choice in localStorage.
Segmented button styled to match MapLibre controls.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Moves map marker storage from browser localStorage to a server-side database
table so pins survive cache clears, browser changes, and device switches.
Backend:
- New `map_markers` table with future-proofed columns for routing (marker_type,
route_id, route_order, notes) to avoid a migration when routes are added later
- CRUD endpoints: GET/POST /api/maps/markers, PATCH/DELETE /api/maps/markers/:id
- VineJS validation on create/update
- MapMarker Lucid model
Frontend:
- useMapMarkers hook now fetches from API instead of localStorage
- Marker IDs changed from string (UUID) to number (DB auto-increment)
- API client methods added for all marker operations
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add distance scale bar and user-placed location pins to the offline maps viewer.
- Scale bar (bottom-left) shows distance reference that updates with zoom level
- Click anywhere on map to place a named pin with color selection (6 colors)
- Collapsible "Saved Locations" panel lists all pins with fly-to navigation
- Pins persist in localStorage across page loads
- Full dark mode support for popups and panel via CSS overrides
New files: useMapMarkers hook, MarkerPin component, MarkerPanel component
No backend changes, no new dependencies.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>