]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/contextmenu.js
Merge remote-tracking branch 'upstream/pull/2136'
[rails.git] / app / assets / javascripts / index / contextmenu.js
index 148ccf908441b99cc23a62da95e81c21c55484df..080a4de72b14691b5328a8b12976f061901b23db 100644 (file)
@@ -8,7 +8,8 @@ OSM.initializeContextMenu = function (map) {
           lng = latlng.lng.toFixed(precision);
 
       OSM.router.route("/directions?" + querystring.stringify({
-        route: lat + "," + lng + ";" + $("#route_to").val()
+        from: lat + "," + lng,
+        to: $("#route_to").val()
       }));
     }
   });
@@ -22,7 +23,8 @@ OSM.initializeContextMenu = function (map) {
           lng = latlng.lng.toFixed(precision);
 
       OSM.router.route("/directions?" + querystring.stringify({
-        route: $("#route_from").val() + ";" + lat + "," + lng
+        from: $("#route_from").val(),
+        to: lat + "," + lng
       }));
     }
   });
@@ -47,7 +49,7 @@ OSM.initializeContextMenu = function (map) {
           lat = latlng.lat.toFixed(precision),
           lng = latlng.lng.toFixed(precision);
 
-      OSM.router.route("/search?query=" + encodeURIComponent(lat + "," + lng));
+      OSM.router.route("/search?whereami=1&query=" + encodeURIComponent(lat + "," + lng));
     }
   });