]> git.openstreetmap.org Git - rails.git/commitdiff
Correctly swap from and to values when reversing directions
authorJamie Guthrie <jamie.guthrie@gmail.com>
Wed, 14 Feb 2018 06:49:41 +0000 (06:49 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 14 Feb 2018 17:22:39 +0000 (17:22 +0000)
Closes #1752
Fixes #1748

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
     }));
   });
 
     }));
   });