]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions.js
Move the MapQuest API key to the configuration file
[rails.git] / app / assets / javascripts / index / directions.js
index a8615d3eb11339f3cc7c35a39a9f06d28f00fdb5..a5f3b00802c1afd68c9d5b4c58cf800e1ba6caec 100644 (file)
@@ -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(','));