From 6d511fbd34f5e9b63d5dd1594e50856fe22c36bf Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Wed, 26 Aug 2015 21:38:39 +0200 Subject: [PATCH] Directions, read "to" location in URL - fixes #998 --- app/assets/javascripts/index/directions.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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(',')); -- 2.39.5