]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/application.js
Force the X-Page-Title value to be treated as UTF-8
[rails.git] / app / assets / javascripts / application.js
index 25d68d0ea05d0bf608bdc05dc3b1fb1e99fc49a6..bc8719700aa217b53aff1bd8676db0fcc44f9e2d 100644 (file)
@@ -61,13 +61,22 @@ function remoteEditHandler(bbox, select) {
 function updatelinks(loc, zoom, layers, object) {
   $(".geolink").each(function(index, link) {
     var href = link.href.split(/[?#]/)[0],
+      args = querystring.parse(link.search.substring(1)),
       editlink = $(link).hasClass("editlink");
 
     if (object && editlink) {
-      href += '?' + object.type + '=' + object.id;
+      delete args['node'];
+      delete args['way'];
+      delete args['relation'];
+      delete args['changeset'];
+
+      args[object.type] = object.id;
     }
 
-    var args = {
+    var query = querystring.stringify(args);
+    if (query) href += '?' + query;
+
+    args = {
       lat: loc.lat,
       lon: loc.lon || loc.lng,
       zoom: zoom