Phase 2: MapLibre GL with OpenSeaMap navigation

- Integrated MapLibre GL for professional maritime mapping
- Combined OSM base maps with OpenSeaMap layer for nautical overlays
  * Seamarks, buoys, channels, and depth information
  * Fully styled with MapLibre-compatible tiles

- Created NavigationMap component with:
  * Real-time ship position marker with heading indicator
  * Automatic centering and smooth flyTo animations
  * Waypoint display with current waypoint highlighting
  * Ship track visualization (last 500 points, dashed line)
  * Route polyline showing waypoints

- Professional map controls:
  * Zoom in/out buttons with smooth animations
  * Center-on-ship button for quick navigation
  * Info panel showing current position, heading, speed, distance
  * Glassmorphic info panel with dark/light mode support

- Enhanced SignalK mock:
  * Added trackPoints array to record ship movement
  * Automatically maintains last 500 points for performance
  * Integrated with map for visual track history

- Updated Navigation page to use new map
- Build: 68 modules, 1.24 MB (343 KB gzipped)
- Hot module reloading working smoothly

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-03-27 15:00:17 +01:00
parent 4fab26106c
commit 0b70891bca
6 changed files with 689 additions and 4 deletions

View File

@@ -69,6 +69,7 @@ export function createSignalKMock() {
waterUsed: 23,
wasteWater: 18,
freshWater: 156,
trackPoints: [{ lat: WAYPOINTS[0].lat, lon: WAYPOINTS[0].lon }],
}
// Navigate to next waypoint
@@ -115,6 +116,12 @@ export function createSignalKMock() {
state.lat += dLat
state.lon += dLon
// Record track point (keep last 500)
state.trackPoints.push({ lat: state.lat, lon: state.lon })
if (state.trackPoints.length > 500) {
state.trackPoints.shift()
}
}
function buildDelta() {