diff --git a/README.md b/README.md index 8bbbfad..274e382 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,8 @@ static/data/ The frontend loads `/data/_index.json`, then fetches each layer's GeoJSON and renders it as a toggleable overlay with a legend (top-right). Every layer can be -shown/hidden independently. +shown/hidden independently. **By default no layers are shown on load** — toggle the +ones you want from the legend. ## OSM Data-Dump Ingestion (`osm-dump.mjs`) @@ -221,6 +222,12 @@ The matcher: matches still hit (e.g. `philbrick` finds `Philbrook`). - Ranks name matches above address matches above description matches. +## Preferences & Units + +Click **⚙ Preferences** in the top bar to choose **Metric** or **Imperial** units. +Your choice (and the granular unit override) is saved to `localStorage`, so it +persists across reloads and is shared by the Directions panel. + ## Directions & Routing When a dump layer is present (it carries the routable graph), a **Directions** @@ -235,6 +242,13 @@ button appears in the top bar. Opening it lets you: large one for long routes), plus a **travel mode** (Drive or Walk). - See the route's **distance** and an **estimated travel time** (computed from the mode's average speed). +- **Turn-by-turn directions** (*Head north*, *Turn right*, *Arrive at destination*, + …) are generated for **Drive** mode and listed beneath the result; a live + progress bar shows while the route computes. +- **Robustness:** if A/B are far from the routable road network, or the destination + is disconnected / fully blocked by avoided categories, the app reports *why* and + still draws the **closest reachable** portion of a route (flagged as a partial + path) instead of failing silently. Routing is done **entirely in the browser** (`src/lib/routing.ts`): an A*-search over the graph built from the OSM dump. Point A/B are snapped to the @@ -248,6 +262,10 @@ const r = route(graph, [latA, lonB], [latB, lonB], pois, [ { category: 'amenity', value: 'school', radiusM: 300, block: true } ]); // r.found, r.path ([[lat,lon],...]), r.distanceM +// r.partial (best-effort partial route when the destination is unreachable), +// r.fromSnapM / r.toSnapM (distance from A/B to nearest road), +// r.reason (human explanation when no full route exists), +// r.turns (turn-by-turn steps for driving mode) ``` ## Deployment