From 9ca46b9d3521d8af36ae5a8990f0943ecade5b9d Mon Sep 17 00:00:00 2001 From: vcoppe Date: Wed, 24 Dec 2025 17:21:26 +0100 Subject: [PATCH] small fix --- website/src/lib/components/toolbar/tools/routing/routing.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/src/lib/components/toolbar/tools/routing/routing.ts b/website/src/lib/components/toolbar/tools/routing/routing.ts index c5ad8f400..438ddab95 100644 --- a/website/src/lib/components/toolbar/tools/routing/routing.ts +++ b/website/src/lib/components/toolbar/tools/routing/routing.ts @@ -108,7 +108,7 @@ async function getGraphHopperRoute( for (let key of graphhopperDetails) { let detail = details[key]; for (let i = 0; i < detail.length; i++) { - for (let j = detail[i][0]; j < detail[i][1]; j++) { + for (let j = detail[i][0]; j < detail[i][1] + (i == detail.length - 1); j++) { if (detail[i][2] !== undefined && detail[i][2] !== 'missing') { if (key === 'road_class') { route[j].setExtension('highway', detail[i][2]); @@ -122,8 +122,8 @@ async function getGraphHopperRoute( if (mtbScale) { route[j].setExtension('mtb_scale', mtbScale); } - } else { - route[j].setExtension(key, detail[i][2]); + } else if (key === 'surface' && detail[i][2] !== 'other') { + route[j].setExtension('surface', detail[i][2]); } } }