diff --git a/src/lib/components/DirectionsPanel.svelte b/src/lib/components/DirectionsPanel.svelte
index 42b609e..6c3d0f9 100644
--- a/src/lib/components/DirectionsPanel.svelte
+++ b/src/lib/components/DirectionsPanel.svelte
@@ -1,7 +1,6 @@
+
+
+
e.stopPropagation()} onkeydown={(e) => { if (e.key === 'Escape') onClose(); }}>
+
+
+ {#if isPoint}
+
{title}
+
{lat.toFixed(5)}, {lon.toFixed(5)}
+ {#if rows.length}
+
+
+ {#each rows as [k, v] (k)}
+ | {k} | {v} |
+ {/each}
+
+
+ {/if}
+ {#if savedPoint}
+
Saved point
+ {/if}
+
+
+
+ {#if hasOrigin && !isOrigin}
+
+ {/if}
+ {#if savedPoint}
+
+ {/if}
+
+ {:else}
+
New location
+
{lat.toFixed(5)}, {lon.toFixed(5)}
+
+ {#if saving}
+
{ if (e.key === 'Enter') save(); if (e.key === 'Escape') { saving = false; onClose(); } }}
+ />
+
+
+
+
+ {:else}
+
This isn't a known point. Save it to use later.
+
+
+
+
+ {/if}
+ {/if}
+
+
+
\ No newline at end of file
diff --git a/src/lib/components/MapView.svelte b/src/lib/components/MapView.svelte
index 683ea90..3f82823 100644
--- a/src/lib/components/MapView.svelte
+++ b/src/lib/components/MapView.svelte
@@ -5,9 +5,10 @@
import { search, type Searchable, type SearchResult } from '$lib/search';
import { geocode, type GeocodedPlace } from '$lib/geocode';
import DirectionsPanel from '$lib/components/DirectionsPanel.svelte';
+ import LocationDialog from '$lib/components/LocationDialog.svelte';
import { prefs } from '$lib/prefs';
import type { RouteGraph, AvoidRule, RouteResult } from '$lib/routing';
- import { savedPoints, addSavedPoint, exportSavedPoints, importSavedPoints, type SavedPoint } from '$lib/savedPoints';
+ import { savedPoints, addSavedPoint, removeSavedPoint, exportSavedPoints, importSavedPoints, type SavedPoint } from '$lib/savedPoints';
type FeatureCollection = {
type: string;
@@ -63,6 +64,13 @@
// Set by a search result or a direct map click; most recent wins.
let origin = $state<{ lat: number; lon: number; label?: string } | null>(null);
let originLayer: L.Layer | null = null;
+ let destination = $state<{ lat: number; lon: number; label?: string } | null>(null);
+ // --- context dialog (shown on map click; no auto-save) ---
+ let ctx = $state<{
+ x: number; y: number; lat: number; lon: number;
+ feature?: { name: string; rows: [string, string][] } | null;
+ savedPoint?: SavedPoint | null;
+ } | null>(null);
// --- Saved Points (browser-local) layer ---
let savedPointsList = $state