X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e731dd71a77ad4ad1e9db22535e89444bb98e5d9..6b8c8e8d7e9e0e9db6dff49843f069aa2f6a4530:/app/assets/javascripts/index/contextmenu.js diff --git a/app/assets/javascripts/index/contextmenu.js b/app/assets/javascripts/index/contextmenu.js index fdde8dec4..cac5e6fbf 100644 --- a/app/assets/javascripts/index/contextmenu.js +++ b/app/assets/javascripts/index/contextmenu.js @@ -1,8 +1,6 @@ -//= require querystring +//= require qs/dist/qs OSM.initializeContextMenu = function (map) { - var querystring = require("querystring-component"); - map.contextmenu.addItem({ text: I18n.t("javascripts.context.directions_from"), callback: function directionsFromHere(e) { @@ -11,7 +9,7 @@ OSM.initializeContextMenu = function (map) { lat = latlng.lat.toFixed(precision), lng = latlng.lng.toFixed(precision); - OSM.router.route("/directions?" + querystring.stringify({ + OSM.router.route("/directions?" + Qs.stringify({ from: lat + "," + lng, to: $("#route_to").val() })); @@ -26,7 +24,7 @@ OSM.initializeContextMenu = function (map) { lat = latlng.lat.toFixed(precision), lng = latlng.lng.toFixed(precision); - OSM.router.route("/directions?" + querystring.stringify({ + OSM.router.route("/directions?" + Qs.stringify({ from: $("#route_from").val(), to: lat + "," + lng }));