multi-trip mock + Colombia trip with a real walking router
The mock can now work several trips at once: a trip picker in the topbar, per-trip state in localStorage (edits + version history survive switching), and a per-trip router key so each trip routes on its own OSRM extract. Colombia (Cartagena -> Santa Marta, 8 days) becomes the default working trip, inside a new walking-profile OSRM instance: - scripts/crop_pbf.py: streaming 3-pass PBF cropper (no PBF library; the country file is too big for osmium extract -s complete_ways on this box). Framing validated against osmium test fixtures and osrm-extract. Drops relations (foot profile ignores restrictions). - scripts/setup-osrm-colombia.sh: download -> crop (~4.6 MB) -> extract/partition/customize with the official foot.lua -> serve :5003. Verified: Getsemaní -> Castillo San Felipe 7.98 km / 96 min. - server.js: ROUTERS map, ?router=colombia|northeast on /route, /table, /router-status (per-router probe points). - app.js: legs touching a transit stop are fixed (flight/taxi/bus via M.multimodal), never re-routed; distance-0 router answers (both points on one node) read as adjacent stops, not out-of-coverage. - multi-hotel fix: day-scope map fit uses the stays covering THAT day, so a two-city trip no longer fits the whole country per day. Also: pre-cache-tiles.sh (Cartagena+Santa Marta z14-16, 2560 tiles), tile cache write fix (Node rejects flags:'x'; buffer-then-write), favicon, renderHotelMks load-order guard, tests updated for the new default trip (all four puppeteer suites green, zero console errors).
This commit is contained in:
+8
-3
@@ -4,6 +4,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Trip</title>
|
||||
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext y='.9em' font-size='90'%3E%F0%9F%97%BA%3C/text%3E%3C/svg%3E">
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css">
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
</head>
|
||||
@@ -25,9 +26,10 @@
|
||||
<button id="dz-sample" class="btn ghost small">or start from an example booking</button>
|
||||
</div>
|
||||
<div class="land-demo">
|
||||
<span>or explore a demo trip</span>
|
||||
<button class="chip" data-city="florence">Florence</button>
|
||||
<span>or pick a trip</span>
|
||||
<button class="chip" data-city="colombia">Colombia · Cartagena → Santa Marta <i>· live walking routing</i></button>
|
||||
<button class="chip" data-city="boston">Boston <i>· live road routing</i></button>
|
||||
<button class="chip" data-city="florence">Florence</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -47,7 +49,10 @@
|
||||
<!-- ======================= APP ======================= -->
|
||||
<header id="topbar" class="hidden">
|
||||
<div class="tb-left">
|
||||
<span class="crumb" id="crumb">…</span>
|
||||
<div class="trip-picker" id="trip-picker">
|
||||
<button class="crumb" id="crumb" title="Switch trip — each keeps its own plan">…</button>
|
||||
<div id="trip-menu" class="tripmenu hidden"></div>
|
||||
</div>
|
||||
<div class="scope-toggle" title="Day = working view · Trip = macro overview of all days">
|
||||
<button id="scope-day" class="sct on" data-sc="day">Day</button>
|
||||
<button id="scope-trip" class="sct" data-sc="trip">Trip</button>
|
||||
|
||||
Reference in New Issue
Block a user