Improve trail planning: option to re-order route anchors (#1007)

* trail anchor list added

* add search location card to extend route endpoint in drawing mode

* add POI popup endpoint action in route drawing mode

* fix anchor stats, improve anchor list entries and refine route marker behavior

* fix map marker spinner

* docs updated

* fix spinner when delete an anchor

* further improvements

* fix adding first anchor from POI

* optimize drag handle area

---------

Co-authored-by: Flomp <Flomp@users.noreply.github.com>
This commit is contained in:
slothful-vassal
2026-06-06 11:56:12 +02:00
committed by GitHub
parent 14ebaa0d04
commit 44cd092065
32 changed files with 1792 additions and 192 deletions

View File

@@ -19,6 +19,7 @@
import { ClusterLayer } from "$lib/vendor/maplibre-layer-manager/cluster-layer";
import { baseMapStyles } from "$lib/vendor/maplibre-layer-manager/layers";
import { LayerManager } from "$lib/vendor/maplibre-layer-manager/maplibre-layer-manager";
import type { OverpassPopupActionFactory } from "$lib/vendor/maplibre-layer-manager/overpass-layer";
import { PreviewLayer } from "$lib/vendor/maplibre-layer-manager/preview-layer";
import { TerrainLayer } from "$lib/vendor/maplibre-layer-manager/terrain-layer";
import { TrailLayer } from "$lib/vendor/maplibre-layer-manager/trail-layer";
@@ -69,6 +70,7 @@
) => void;
oninit?: (map: M.Map) => void;
autoGeolocateOnDrawing?: boolean;
buildPoiAnchorAction?: OverpassPopupActionFactory;
}
let {
@@ -100,6 +102,7 @@
onUnclusteredClick,
oninit,
autoGeolocateOnDrawing = false,
buildPoiAnchorAction = undefined,
}: Props = $props();
let mapContainer: HTMLDivElement;
@@ -809,7 +812,7 @@
};
map = new M.Map(finalMapOptions);
layerManager = new LayerManager(map);
layerManager = new LayerManager(map, { overpassActionFactory: buildPoiAnchorAction });
elevationMarker = new FontawesomeMarker(
{