From: Tom Hughes Date: Thu, 27 Feb 2025 20:31:19 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/5727' X-Git-Tag: live~3 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/648b8ba1f83e9923bb43a9175ea548405c9a403d?hp=--cc Merge remote-tracking branch 'upstream/pull/5727' --- 648b8ba1f83e9923bb43a9175ea548405c9a403d diff --cc app/assets/javascripts/index/directions.js index 07d39974d,ceda70ee0..ee8d3b8c5 --- a/app/assets/javascripts/index/directions.js +++ b/app/assets/javascripts/index/directions.js @@@ -296,9 -302,15 +312,9 @@@ OSM.Directions = function (map) const params = new URLSearchParams(location.search), route = (params.get("route") || "").split(";"); - if (params.has("engine")) { - const engineIndex = findEngine(params.get("engine")); - - if (engineIndex >= 0) { - setEngine(engineIndex); - } - } + if (params.has("engine")) setEngine(params.get("engine")); - endpoints[0].setValue(params.get("from") || route[0] || ""); + endpoints[0].setValue(params.get("from") || route[0] || lastLocation.join(", ")); endpoints[1].setValue(params.get("to") || route[1] || ""); map.setSidebarOverlaid(!endpoints[0].latlng || !endpoints[1].latlng);