X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/cd4ac6ac2dfaea3f2c7419d8b6d5e0a9490e286a..a47c0a4411825f48e447641094678b15df3b2f74:/app/assets/javascripts/index/directions.js diff --git a/app/assets/javascripts/index/directions.js b/app/assets/javascripts/index/directions.js index 4f65acdea..71eedaa83 100644 --- a/app/assets/javascripts/index/directions.js +++ b/app/assets/javascripts/index/directions.js @@ -139,7 +139,7 @@ OSM.Directions = function (map) { var from = endpoints[0].latlng, to = endpoints[1].latlng; - OSM.router.route("/directions?" + querystring.stringify({ + OSM.router.route("/directions?" + qs.stringify({ from: $("#route_to").val(), to: $("#route_from").val(), route: to.lat + "," + to.lng + ";" + from.lat + "," + from.lng @@ -210,7 +210,7 @@ OSM.Directions = function (map) { var precision = OSM.zoomPrecision(map.getZoom()); - OSM.router.replace("/directions?" + querystring.stringify({ + OSM.router.replace("/directions?" + qs.stringify({ engine: chosenEngine.id, route: o.lat.toFixed(precision) + "," + o.lng.toFixed(precision) + ";" + d.lat.toFixed(precision) + "," + d.lng.toFixed(precision) @@ -367,7 +367,7 @@ OSM.Directions = function (map) { getRoute(true, true); }); - var params = querystring.parse(location.search.substring(1)), + var params = qs.parse(location.search.substring(1)), route = (params.route || "").split(";"), from = route[0] && L.latLng(route[0].split(",")), to = route[1] && L.latLng(route[1].split(","));