Planning (the Design canvas' Plan and GridToday, ideas from azedler/roadplanner): a stop's type as its NPS pictogram (marker and list), notes on the trip, its days and stops, + on a leg inserts the next point there; a parking spot per stop (P marker, the route goes there, the walk shown); a link pasted into the search becomes a place (/api/link: the URL's coordinates, else the page's geo meta / JSON-LD / a map link; public addresses only, logged in), added on the leg it lengthens least; avoids for the trip (+ ferries, unpaved) or a day (routed in pieces, joined); Check and Costs folds in the Route panel (no leave time, long days, arriving after sunset, long walks, missing vignettes; fuel from km × consumption × price, stop costs / paid, the budget); Today in drive mode's Menu (stops left, tonight, sunset, Open-Meteo weather, the day's notes, Skip next, Tomorrow). Plugins along the trip's route (Maptool::Corridor, a corridor width; Overpass around:) and plugin settings saved server-side; p4n via a host Firefox's cookies (docs/deployment.adoc). The recording's days (cut where the car stood ≥ 4 h, or by hand) and their export (days, a piece A–B, the whole trip; GPX with times). Track replay in the GNSS simulator. Step advance 5 m past a maneuver. The level gauge (drive mode, from Terrain): lift per wheel to the ramps' steps from roll, pitch, wheelbase and track
This commit is contained in:
1 parent
5e31dfaba9
commit
87d7bd2463
36 files changed
+2047
-123
No files matched your search
@@ -120,6 +120,23 @@ export class SearchControl {
|
||||
return;
|
||||
}
|
||||
|
||||
// A pasted link (Google Maps, park4night, a page with coordinates):
|
||||
// the server reads the place from it (lib/maptool/link_place.rb)
|
||||
if (/^(https?:\/\/|geo:)\S+$/i.test(query)) {
|
||||
this._renderResults([], true);
|
||||
try {
|
||||
const response = await fetch(`/api/link?${new URLSearchParams({ url: query })}`);
|
||||
const place = await response.json();
|
||||
if (!response.ok) throw new Error(response.status === 401 ? "log in to read links" : place.error);
|
||||
let where = "From the link";
|
||||
try { where = `From ${new URL(place.url || query).hostname}`; } catch { /* geo: */ }
|
||||
this._renderResults([{ name: place.name || `${place.lat.toFixed(5)}, ${place.lng.toFixed(5)}`, where, lat: place.lat, lng: place.lng }]);
|
||||
} catch (err) {
|
||||
this._renderResults([{ status: `That link: ${err.message}` }]);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Every source answers on its own; the list re-renders (nearest first
|
||||
// across all of them) as each one comes in.
|
||||
const searchId = (this._searchId = (this._searchId || 0) + 1);
|
||||
|
||||
Reference in new issue
Block a user