diff --git a/TODO.adoc b/TODO.adoc
index 6b4ed97..9b2dcce 100644
--- a/TODO.adoc
+++ b/TODO.adoc
@@ -89,12 +89,12 @@ independence from connectivity.
The app is already reachable from the internet behind login, so a tablet is enough to
plan from — the server does the heavy lifting. The UI is built for a mouse today.
-* [ ] Touch targets ≥ 44 px (tree rows, panel buttons, icon grids)
+* [x] Touch targets ≥ 44 px (tree rows, panel buttons, icon grids) — on the Pad7 everything is big enough (2026-12-03), nothing more to do
** [x] Route markers: an invisible 48px grab area around the dot (a finger missed the 26px dot and panned the map)
** [x] Tracks & Points open/close arrows: a 24×28 px hit area, 36×40 on touch screens
** [x] Notes can be moved (Move in the popup: drag the marker or tap the new spot), and new/edited points get an icon, a color and B/I buttons
-* [ ] Nothing reachable only by hover — tooltips and flyouts must open on tap too
-* [ ] A touch substitute for the Alt+click debug inspector (e.g. long-press)
+* [x] Nothing reachable only by hover — tooltips and flyouts must open on tap too
+* [x] A touch substitute for the Alt+click debug inspector (e.g. long-press) — the long press is a contextmenu: what's here
* [x] Side panels as an overlay in portrait instead of a pinned column — under 640 px the pin is ignored and the panel floats over the map at full width (a pinned 300 px panel left the phone a sliver of map); a real bottom sheet still open
* [x] Driving mode (field test in the car, 2026-11): tiny icons and lists can't be hit while driving — a separate big-button UI for the few things needed on the road (navigate/follow, night mode, zoom, layer presets) rather than enlarging every planning panel. Done: "Drive" in the topbar (`driving.js`), per device — Follow, zoom, 2D/3D, night, route overview, exit down the left side; the sidebar and panels hidden
** [x] Layer presets on the driving bar (Layers: Road / Off-road / Overnight, + Keep)
@@ -163,9 +163,11 @@ plan from — the server does the heavy lifting. The UI is built for a mouse tod
text fields. Who: the navigator (co-driver) runs the whole UI and the trip's points on the
16" display; the driver only looks at a finished map on Android Auto, touching the 16"
only now and then — so it's simple for a moving car, not driver-distraction rules
-* [ ] Desktop (the Design canvas' Desktop, 2026-12-03): copy the position under the cursor
+* [x] Desktop (the Design canvas' Desktop, 2026-12-03): copy the position under the cursor
to the clipboard (a key or the right-click menu) — today only the map's center copies,
- from the status bar, so the way around it is to put the center on the point first
+ from the status bar, so the way around it is to put the center on the point first. Done: right
+ click / long press / Alt+click = what's here (the position, a click copies it; Route here, Add to
+ the trip, Save a point; the features' raw properties folded), C copies the position under the mouse
* [x] Desktop: the scale back over the map, not in the status bar
* [x] Night mode — topbar button cycles auto (sun below the horizon at the map center) / on / off. The map has its own night palette (`NightMap` in `public/js/map_themes.js`, switched live with setPaintProperty): dark blue-gray ground, roads a step lighter, muted ochre motorways, light-gray labels on dark halos; raster overlays dimmed, our own track/point colors kept
** [x] The rest of the UI is still one invert+dim filter — CSS color tokens and a real dark set instead
@@ -329,8 +331,10 @@ already reaches the home MQTT broker (`mqtt_ext`) from ESPHome nodes in `~/espho
gain `type`, `street`, `exit`
** [x] The driving view decluttered: tilted to 3D (≥ 30°), route numbers and minor roads' /
paths' names hidden; road labels 1.5× further apart, past z15 the same ground distance
-** [ ] Turn-by-turn voice (`speechSynthesis`), the route ahead highlighted / the driven part
- greyed
+** [x] Turn-by-turn voice (`speechSynthesis`), the route ahead highlighted / the driven part
+ greyed. Voice: Valhalla's `verbal_transition_alert_instruction` ("In 400 meters, …", 25 s / ≥ 400 m
+ ahead) and `verbal_pre_transition_instruction` (7 s / ≥ 60 m ahead), English; on/off in drive
+ mode's Menu, off by default
** [x] Lanes as SVG arrows, one per direction bit, the lanes to take (Valhalla's `active`) blue
with that direction bold
*** [ ] Lane guidance before motorway exits (lanes several maneuvers ahead), bigger on the
@@ -379,8 +383,8 @@ already reaches the home MQTT broker (`mqtt_ext`) from ESPHome nodes in `~/espho
*** [ ] Replay a library track (GPX/FIT with times) instead, at its own speed
** [x] Free look while following: moving the map by hand pauses the follow, "Back to the
position" or 15 s untouched resumes it
-* [ ] While following a planned route: the route ahead highlighted, distance to the next
- maneuver from Valhalla's directions
+* [x] While following a planned route: the route ahead highlighted, distance to the next
+ maneuver from Valhalla's directions (the banner; the driven part dashed)
=== Design: the park brochure and the cockpit
diff --git a/lib/maptool/routing.rb b/lib/maptool/routing.rb
index bb8942e..8787ec1 100644
--- a/lib/maptool/routing.rb
+++ b/lib/maptool/routing.rb
@@ -265,7 +265,8 @@ module Maptool
def self.maneuver(m)
{ text: m["instruction"], km: m["length"], type: m["type"], street: (m["begin_street_names"] || m["street_names"])&.first,
- exit: m["roundabout_exit_count"], lanes: m["lanes"] }.compact
+ exit: m["roundabout_exit_count"], lanes: m["lanes"],
+ alert: m["verbal_transition_alert_instruction"], say: m["verbal_pre_transition_instruction"] }.compact
end
private_class_method :maneuver
diff --git a/public/css/style.css b/public/css/style.css
index 6304181..fc76e7b 100644
--- a/public/css/style.css
+++ b/public/css/style.css
@@ -1504,6 +1504,21 @@ button.basemap-panel__link[hidden] { display: none; }
word-break: break-word;
}
+/* what's here (map.js): the position, what to do with it, the features folded */
+.here-popup .maplibregl-popup-content { padding: 0; max-height: 420px; }
+.here button { font: inherit; color: inherit; cursor: pointer; }
+.here__position { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 28px 10px 12px; border: none; border-bottom: 1px solid var(--ui-line); background: none; text-align: left; }
+.here__position > span { flex: 1; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
+.here__position b { font-size: 15px; }
+.here__position small, .here__position em { color: var(--ui-muted); font-style: normal; font-size: 12px; }
+.here__actions { display: flex; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--ui-line); }
+.here__actions button { flex: 1; height: 30px; padding: 0 6px; border: 1px solid var(--ui-line); border-radius: 6px; background: none; font-weight: 600; font-size: 12px; white-space: nowrap; }
+.here__actions button:hover { background: var(--ui-hover, rgba(0, 0, 0, 0.06)); }
+.here__features { padding: 8px 12px 0; }
+.here__features summary { font-weight: 600; cursor: pointer; }
+.here__features .debug-popup__feature:first-of-type { margin-top: 6px; }
+.here__hint { padding: 6px 12px 8px; font-size: 11px; color: var(--ui-muted); }
+
.maplibregl-ctrl-overview-map {
border-radius: 4px;
overflow: hidden;
diff --git a/public/js/dashboard.js b/public/js/dashboard.js
index 6a02b61..64ab4eb 100644
--- a/public/js/dashboard.js
+++ b/public/js/dashboard.js
@@ -39,6 +39,12 @@ const TRACE_STEP_M = 10; // fixes kept for /api/road at least this far apart
const LANES_AHEAD_M = 1000; // the next maneuver's lanes from this close
const DEFAULT_WIDGETS = { inclinometer: true, speed: true, altitude: true, navigation: true, banner: true };
const THEN_M = 300; // the maneuver after the next one shown with it when it follows this closely
+// Voice prompts (speechSynthesis, Valhalla's verbal instructions), on/off in
+// drive mode's Menu: "In 400 m, turn right…" from SOON_S ahead, the
+// instruction itself NOW_S before the maneuver (at least the metres given).
+export const VOICE_KEY = "maptool.voice";
+const SOON_S = 25, SOON_M = 400;
+const NOW_S = 7, NOW_M = 60;
const DEFAULT_OPACITY = 0.45; // the card's background, the map shows through
const load = () => {
@@ -187,7 +193,9 @@ export class DashboardControl {
this._lastAt = 0;
this._offFixes = 0;
this._sentKm = undefined; // the new route drawn by the next fix
+ this._said = new Set();
}));
+ this._said = new Set(); // voice prompts given: "maneuver index:soon|now"
this._trace = []; // [lon, lat] fixes TRACE_STEP_M apart, for /api/road
this._road = null; // its last answer
this._roadAt = 0;
@@ -228,6 +236,21 @@ export class DashboardControl {
notifyRouteProgress(km);
}
+ _speak(index, maneuver, m, speed) {
+ let voiceOn = false;
+ try { voiceOn = localStorage.getItem(VOICE_KEY) === "on"; } catch { /* private window */ }
+ if (!voiceOn || !window.speechSynthesis) return;
+ const now = Math.max(NOW_M, speed * NOW_S);
+ let stage = null, text = null;
+ if (m <= now) [stage, text] = ["now", maneuver.say];
+ else if (m <= Math.max(SOON_M, speed * SOON_S) && m > 2 * now && maneuver.alert) {
+ [stage, text] = ["soon", `In ${distance(m).replace(" m", " meters").replace(" km", " kilometers")}, ${maneuver.alert[0].toLowerCase()}${maneuver.alert.slice(1)}`];
+ }
+ if (!text || this._said.has(`${index}:${stage}`)) return;
+ this._said.add(`${index}:soon`).add(`${index}:${stage}`);
+ speechSynthesis.speak(new SpeechSynthesisUtterance(text));
+ }
+
// The limit and what's ahead: from the route while on it, else the road.
_navigate() {
const { lat, lon, speed } = this._values;
@@ -261,6 +284,7 @@ export class DashboardControl {
then: maneuver && then && then.at - maneuver.at <= THEN_M / 1000 ? then : null,
street: onStreet,
};
+ if (maneuver && off <= ON_ROUTE_M) this._speak(index, maneuver, (maneuver.at - at) * 1000, speed ?? 0);
return;
}
this._progress(null);
diff --git a/public/js/driving.js b/public/js/driving.js
index 83c8a59..1926708 100644
--- a/public/js/driving.js
+++ b/public/js/driving.js
@@ -3,7 +3,7 @@ import { requestGnssFollow, onRouteChanged } from "/js/panels.js";
import { pauseFollow, resumeFollow, isFollowing } from "/js/gnss.js";
import { formatDuration } from "/js/route.js";
import { isLoggedIn } from "/js/auth.js";
-import { watchDashboard, maneuverSvg, distance } from "/js/dashboard.js";
+import { watchDashboard, maneuverSvg, distance, VOICE_KEY } from "/js/dashboard.js";
import { formatSunInfo } from "/js/sun.js";
import { pointsMenu, layersMenu, terrainMenu, elevationHtml, cellButton, bindKey, emptyRow as empty, escapeHtml } from "/js/drive_menus.js";
@@ -104,6 +104,7 @@ export function setupDriving(map, nightButton, routePanel, gpxPanel) {
+
`;
// auto: opens off-road and closes back on the road; stay: opens and stays (the inclinometer all along); hand: neither
const TERRAIN_MODES = { auto: "opens and closes by itself", stay: "opens by itself, stays", hand: "by hand" };
@@ -117,6 +118,15 @@ export function setupDriving(map, nightButton, routePanel, gpxPanel) {
renderAuto();
});
renderAuto();
+ const voiceButton = menuPanel.querySelector('[data-action="voice"]');
+ const voiceOn = () => { try { return localStorage.getItem(VOICE_KEY) === "on"; } catch { return false; } };
+ const renderVoice = () => { voiceButton.innerHTML = `Voice prompts: ${voiceOn() ? "on" : "off"} tap to switch`; };
+ voiceButton.addEventListener("click", () => {
+ try { localStorage.setItem(VOICE_KEY, voiceOn() ? "off" : "on"); } catch { /* private window: not kept */ }
+ if (voiceOn()) window.speechSynthesis?.speak(new SpeechSynthesisUtterance("Voice prompts on"));
+ renderVoice();
+ });
+ renderVoice();
menuPanel.querySelector('[data-action="overview"]').addEventListener("click", overview);
menuPanel.querySelector('[data-action="leave"]').addEventListener("click", () => set(false));
const crosshair = document.createElement("div");
diff --git a/public/js/map.js b/public/js/map.js
index f62b505..7dbed48 100644
--- a/public/js/map.js
+++ b/public/js/map.js
@@ -20,7 +20,7 @@ import { RoutePanelControl } from "/js/route.js";
import { WAYPOINT_ICON, SUNRISE_ICON, SUNSET_ICON, PENDING_ICON, LOCK_ICON, UNLOCK_ICON } from "/js/icons.js";
import { formatCoords, formatSunInfo, sunChartHtml } from "/js/sun.js";
import { getPosition } from "/vendor/suncalc/suncalc.js";
-import { setupSidePanelModes } from "/js/panels.js";
+import { addRoutePoint, setupSidePanelModes } from "/js/panels.js";
import { isLoggedIn } from "/js/auth.js";
import { DebugControl } from "/js/debug.js";
import { setupUpdate } from "/js/update.js";
@@ -285,7 +285,8 @@ map.addControl(new MeasureControl(), "top-right");
// button that can only ever end in a 401 for a logged-out viewer, same
// "hide the write-only affordance" story as GpxPanelControl's own
// upload/new-folder buttons.
-if (isLoggedIn()) map.addControl(new NotesControl(), "top-right");
+let notesControl = null; // what's here's "Save a point" (below)
+if (isLoggedIn()) map.addControl((notesControl = new NotesControl()), "top-right");
map.addControl(new HomeButton({ bounds: SLOVAKIA_BOUNDS }), "top-right");
// ...as the artboard's three cards: zoom; the view (compass, north lock, 3D,
// my position); the tools (measure, note, home). Each control keeps its own
@@ -581,36 +582,71 @@ Promise.allSettled(ready).then(() => {
else map.once("idle", restore);
});
-// Alt+click, right click or a long press (touch browsers fire
-// contextmenu for it) anywhere shows every rendered feature at that point — base map
-// (OSM tags via OpenFreeMap/protomaps), GPX/FIT layers, radar, all of it —
-// with its raw properties, inspired by NPMap4's infoboxControl (a generic
-// "show me everything here" debug view, kept separate from the curated
-// popups those same features already have via their own layer-specific
-// click handlers, e.g. gpx.js's waypoint popups — both can fire on the same
-// click, which is fine, this is a power-user/debugging affordance, not
-// something replacing the normal popups). No dedicated UI for this
-// deliberately — a keyboard-modified click needs no button, state, or
-// cursor change of its own.
-const inspect = (event) => {
+// Right click, a long press (touch browsers fire contextmenu for it) or
+// Alt+click: what's here (the Design canvas' Desktop). The position on top,
+// a click copies it; Route here / Add to the trip / Save a point; every
+// rendered feature's raw properties folded under it (the debug view it
+// was). C copies the position under the mouse with no popup.
+const copyPosition = async ({ lng, lat }) => {
+ try {
+ await navigator.clipboard.writeText(`${lat.toFixed(6)}, ${lng.toFixed(6)}`);
+ return true;
+ } catch {
+ return false; // clipboard API unavailable (an insecure context)
+ }
+};
+const whatsHere = (event) => {
+ const { lngLat } = event;
const features = map.queryRenderedFeatures(event.point);
- if (features.length === 0) return;
-
- const html = features
+ const rows = features
.map((feature) => {
- const rows = Object.entries(feature.properties)
+ const cells = Object.entries(feature.properties)
.map(([key, value]) => `