Navigation: rerouting off the route (30 m for 3 fixes, HDOP ≤ 5, every 15 s at most) from the position to the points not reached yet; lanes as SVG arrows, the ones to take bold; dashboard background see-through with a slider; the GNSS simulation starts at a random place in the offline countries, the map jumping there
CI / check (push) Successful in 22s
CI / deploy (push) Successful in 18s

This commit is contained in:
randy committed 2026-11-30 19:11:07 +01:00
1 parent fbccb2acc9
commit 5f4c7c6ee8
9 files changed
+176 -35

No files matched your search

+10 -1
View File
@@ -1,6 +1,6 @@
import { Marker } from "/vendor/maplibre-gl/maplibre-gl.mjs";
import { ROUTE_ICON, POSITION_ICON, SAVED_POINT_ICON, REVERSE_ICON, CLEAR_ICON, SAVE_ICON } from "/js/icons.js";
import { notifySidePanelOpen, onlyOneSidePanelOpen, notifyGpxStoreChanged, onRoutePoint, onRouteEdit, notifyRouteChanged } from "/js/panels.js";
import { notifySidePanelOpen, onlyOneSidePanelOpen, notifyGpxStoreChanged, onRoutePoint, onRouteEdit, notifyRouteChanged, onReroute } from "/js/panels.js";
import { isLoggedIn } from "/js/auth.js";
import { wirePreview } from "/js/preview.js";
import { elevationAt } from "/js/dem.js";
@@ -41,6 +41,15 @@ export class RoutePanelControl {
this._request = 0; // so a slow older response can't overwrite a newer one
this._editing = null; // { key, id, name } of a saved route being edited
// Rerouting (the dashboard, off the route): the start and the via points
// already passed give way to the current position.
onReroute(({ from, passed }) => {
if (this._points.length < 2) return;
this._points.splice(0, 1 + passed).forEach((p) => p.marker.remove());
this._addPoint(from, "My position", { quiet: true });
this._points.unshift(this._points.pop());
this._changed();
});
onRoutePoint(({ lngLat, name }) => {
this._setOpen(true);
this._addPoint(lngLat, name);