X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a7092491b069de43bb8d8c30d3526e7095c5cc98..12c1d5e6c05813a0697724277b4d8529a1a7c240:/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 }));