]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/contextmenu.js
Use bootstrap table striping to replace hand-cycled table stripes
[rails.git] / app / assets / javascripts / index / contextmenu.js
index 1adfa2c2492f22f939e7ed6706db44d004da529d..fdde8dec470d7e487f2f0cf05ee81661c61f67d3 100644 (file)
@@ -1,4 +1,8 @@
+//= require querystring
+
 OSM.initializeContextMenu = function (map) {
+  var querystring = require("querystring-component");
+
   map.contextmenu.addItem({
     text: I18n.t("javascripts.context.directions_from"),
     callback: function directionsFromHere(e) {
@@ -7,7 +11,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?" + querystring.stringify({
         from: lat + "," + lng,
         to: $("#route_to").val()
       }));
@@ -22,7 +26,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?" + querystring.stringify({
         from: $("#route_from").val(),
         to: lat + "," + lng
       }));