X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e373c6383713967cb2e4769c127fc2e543691dcf..013ef53c97a1d2c8319f1ac624e8325a06828366:/public/javascripts/site.js diff --git a/public/javascripts/site.js b/public/javascripts/site.js index b1690b7d1..95c0b938e 100644 --- a/public/javascripts/site.js +++ b/public/javascripts/site.js @@ -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");';