]> git.openstreetmap.org Git - rails.git/blobdiff - public/javascripts/site.js
api06: Fix normal way and relation uploading (i.e. not as part of a diff).
[rails.git] / public / javascripts / site.js
index b1690b7d1ef4efa29ebd731643fd5a58cf903a37..95c0b938e3938fe89675fbabd2d55302ccef78b2 100644 (file)
@@ -11,7 +11,9 @@ function updatelinks(lon,lat,zoom,layers) {
     args["lat"] = lat;
     args["lon"] = lon;
     args["zoom"] = zoom;
-    args["layers"] = layers;
+    if (layers) {
+      args["layers"] = layers;
+    }
     node.href = setArgs(node.href, args);
   }
 
@@ -21,7 +23,21 @@ function updatelinks(lon,lat,zoom,layers) {
     args["lat"] = lat;
     args["lon"] = lon;
     args["zoom"] = zoom;
-    args["layers"] = layers;
+    if (layers) {
+      args["layers"] = layers;
+    }
+    node.href = setArgs(node.href, args);
+  }
+
+  node = document.getElementById("exportanchor");
+  if (node) {
+    var args = getArgs(node.href);
+    args["lat"] = lat;
+    args["lon"] = lon;
+    args["zoom"] = zoom;
+    if (layers) {
+      args["layers"] = layers;
+    }
     node.href = setArgs(node.href, args);
   }
 
@@ -32,7 +48,7 @@ function updatelinks(lon,lat,zoom,layers) {
       args.lat = lat;
       args.lon = lon;
       args.zoom = zoom;
-      node.href = setArgs("/edit.html", args);
+      node.href = setArgs("/edit", args);
       node.style.fontStyle = 'normal';
     } else {
       node.href = 'javascript:alert("zoom in to edit map");';