From 3a158c189c456f3068d95522ecefc0f489e310f3 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Fri, 27 Feb 2026 19:23:24 +0000 Subject: [PATCH] Add OSM website links for route and route_master panels Co-Authored-By: Claude Sonnet 4.6 --- web/static/app.js | 4 ++++ web/templates/index.html | 2 ++ 2 files changed, 6 insertions(+) diff --git a/web/static/app.js b/web/static/app.js index a95604d..8bb7913 100644 --- a/web/static/app.js +++ b/web/static/app.js @@ -349,6 +349,8 @@ async function loadRoute(relationId) { // Show route panel document.getElementById('route-panel').classList.remove('d-none'); document.getElementById('route-name').textContent = data.name; + document.getElementById('route-osm-link').href = + `https://www.openstreetmap.org/relation/${relationId}`; // Draw full route in grey if (fullRouteLayer) fullRouteLayer.remove(); @@ -435,6 +437,8 @@ async function loadRouteMaster(relationId) { document.getElementById('route-panel').classList.add('d-none'); document.getElementById('route-master-panel').classList.remove('d-none'); document.getElementById('route-master-name').textContent = data.name; + document.getElementById('route-master-osm-link').href = + `https://www.openstreetmap.org/relation/${relationId}`; const colours = ['#0d6efd', '#dc3545', '#198754', '#fd7e14', '#6f42c1']; const list = document.getElementById('route-master-list'); diff --git a/web/templates/index.html b/web/templates/index.html index 4eb6932..a1f86f6 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -49,6 +49,7 @@
Routes
@@ -58,6 +59,7 @@