X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a47c0a4411825f48e447641094678b15df3b2f74..12c1d5e6c05813a0697724277b4d8529a1a7c240:/app/assets/javascripts/index/contextmenu.js diff --git a/app/assets/javascripts/index/contextmenu.js b/app/assets/javascripts/index/contextmenu.js index 1adfa2c24..cac5e6fbf 100644 --- a/app/assets/javascripts/index/contextmenu.js +++ b/app/assets/javascripts/index/contextmenu.js @@ -1,3 +1,5 @@ +//= require qs/dist/qs + OSM.initializeContextMenu = function (map) { map.contextmenu.addItem({ text: I18n.t("javascripts.context.directions_from"), @@ -7,7 +9,7 @@ OSM.initializeContextMenu = function (map) { lat = latlng.lat.toFixed(precision), lng = latlng.lng.toFixed(precision); - OSM.router.route("/directions?" + qs.stringify({ + OSM.router.route("/directions?" + Qs.stringify({ from: lat + "," + lng, to: $("#route_to").val() })); @@ -22,7 +24,7 @@ OSM.initializeContextMenu = function (map) { lat = latlng.lat.toFixed(precision), lng = latlng.lng.toFixed(precision); - OSM.router.route("/directions?" + qs.stringify({ + OSM.router.route("/directions?" + Qs.stringify({ from: $("#route_from").val(), to: lat + "," + lng }));