From: Simon Legner Date: Wed, 26 Aug 2015 19:38:39 +0000 (+0200) Subject: Directions, read "to" location in URL - fixes #998 X-Git-Tag: live~4625^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/6d511fbd34f5e9b63d5dd1594e50856fe22c36bf Directions, read "to" location in URL - fixes #998 --- diff --git a/app/assets/javascripts/index/directions.js b/app/assets/javascripts/index/directions.js index a8615d3eb..a5f3b0080 100644 --- a/app/assets/javascripts/index/directions.js +++ b/app/assets/javascripts/index/directions.js @@ -336,13 +336,8 @@ OSM.Directions = function (map) { setEngine(params.engine); } - if (params.from) { - endpoints[0].setValue(params.from); - endpoints[1].setValue(""); - } else { - endpoints[0].setValue(""); - endpoints[1].setValue(""); - } + endpoints[0].setValue(params.from || ""); + endpoints[1].setValue(params.to || ""); var o = route[0] && L.latLng(route[0].split(',')), d = route[1] && L.latLng(route[1].split(','));