]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions.js
Correctly swap from and to values when reversing directions
[rails.git] / app / assets / javascripts / index / directions.js
index 165d57f40f9a3b351c1db8d083420ddc231afdb5..c0aed706c6043702e3b6465495e0fabb7ec1a029 100644 (file)
@@ -123,7 +123,7 @@ OSM.Directions = function (map) {
     OSM.router.route("/directions?" + querystring.stringify({
       from: $("#route_to").val(),
       to: $("#route_from").val(),
     OSM.router.route("/directions?" + querystring.stringify({
       from: $("#route_to").val(),
       to: $("#route_from").val(),
-      route: from.lat + "," + from.lng + ";" + to.lat + "," + to.lng
+      route: to.lat + "," + to.lng + ";" + from.lat + "," + from.lng
     }));
   });
 
     }));
   });