Directions
{#if loadError}
{loadError}
{:else if !graph}
{loadingData ? 'Loading road network…' : 'No network source.'}
{/if}
{#if graph}
{#if from}
A · {from[0].toFixed(4)}, {from[1].toFixed(4)}
{:else}
{/if}
{#if to}
B · {to[0].toFixed(4)}, {to[1].toFixed(4)}
{:else}
{/if}
Avoid
{#each CATEGORIES as c (c.key)}
{/each}
{#if from && to}
{/if}
{#if result}
{#if result.found}
Distance: {(result.distanceM / 1000).toFixed(2)} km
{result.nodesVisited.toLocaleString()} nodes searched
{:else}
No route found (blocked or disconnected).
{/if}
{/if}
Set A & B by clicking the map, pick categories to avoid, then compute.
{/if}