Directions
A · {origin.label || `${origin.lat.toFixed(4)}, ${origin.lon.toFixed(4)}`}
{#if !hasGraph}
Road data layer needed for route computation
The {graphLabel} isn't loaded yet. Load it to enable routing.
{/if}
{#if hasGraph}
{#if destination}
B · {destination.label || `${destination.lat.toFixed(4)}, ${destination.lon.toFixed(4)}`}
{:else}
Click a point on the map, or search below.
{#if savedPoints.length && !destQuery.trim()}
— or a saved point —
{#each savedPoints as p (p.id)}
{/each}
{/if}
{/if}
{#if optionsOpen}
{/if}
{#if computing}
Computing route… {Math.round(progress * 100)}%
{/if}
{#if status === 'error'}
No complete route. {errorMsg}
{:else if result}
Distance{formatDistance(result.distanceM)}
{formatAlt(result.distanceM)}
Est. time{formatTime(result.distanceM)}
{mode === 'drive' ? 'driving' : 'walking'} · {result.nodesVisited.toLocaleString()} nodes searched
{#if result.reason}
{result.reason}
{/if}
{#if turns}
Turn-by-turn
{#each turns.list as t, i (i + '-' + t.instruction)}
- {formatDistance(t.distanceM)}{t.instruction}
{/each}
{turns.list.length} steps · {formatDistance(turns.total)} total
{/if}
{/if}
{/if}
Pick a destination (map click or search), then calculate the route.