From 71cdc03da555cebcaf675d56886d2e2a8fb707df Mon Sep 17 00:00:00 2001 From: vcoppe Date: Tue, 7 Apr 2026 22:15:17 +0200 Subject: [PATCH 1/2] file specific routing controls layers --- .../lib/components/toolbar/tools/routing/routing-controls.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/lib/components/toolbar/tools/routing/routing-controls.ts b/website/src/lib/components/toolbar/tools/routing/routing-controls.ts index b590f56a8..fc832265c 100644 --- a/website/src/lib/components/toolbar/tools/routing/routing-controls.ts +++ b/website/src/lib/components/toolbar/tools/routing/routing-controls.ts @@ -85,7 +85,7 @@ export class RoutingControls { this.file = file; for (let zoom = MIN_ANCHOR_ZOOM; zoom <= MAX_ANCHOR_ZOOM; zoom++) { this.layers.set(zoom, { - id: `routing-controls-${zoom}`, + id: `routing-controls-${this.fileId}-${zoom}`, anchors: [], }); } From b3a11125a54c46062720d7269e36ac0c27548aef Mon Sep 17 00:00:00 2001 From: vcoppe Date: Tue, 7 Apr 2026 22:19:03 +0200 Subject: [PATCH 2/2] adapt temporary anchor layer --- .../components/toolbar/tools/routing/routing-controls.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/website/src/lib/components/toolbar/tools/routing/routing-controls.ts b/website/src/lib/components/toolbar/tools/routing/routing-controls.ts index fc832265c..d370816b4 100644 --- a/website/src/lib/components/toolbar/tools/routing/routing-controls.ts +++ b/website/src/lib/components/toolbar/tools/routing/routing-controls.ts @@ -1073,7 +1073,9 @@ export class RoutingControls { if (!this.temporaryAnchor) { return; } - let source = get(map)?.getSource('routing-controls-0') as GeoJSONSource | undefined; + let source = get(map)?.getSource(`routing-controls-${this.fileId}-0`) as + | GeoJSONSource + | undefined; if (source) { if (this.temporaryAnchor) { source.updateData({ @@ -1088,7 +1090,9 @@ export class RoutingControls { return; } const map_ = get(map); - let source = map_?.getSource('routing-controls-0') as GeoJSONSource | undefined; + let source = map_?.getSource(`routing-controls-${this.fileId}-0`) as + | GeoJSONSource + | undefined; if (source) { if (this.temporaryAnchor) { source.updateData({