X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/7b9272ffa64c33b2b58f4019bdeffa855d280d10..9b04fb5789c46d35398ea87d723a9c579a54d4d6:/public/javascripts/site.js diff --git a/public/javascripts/site.js b/public/javascripts/site.js index b610f3728..55d33d992 100644 --- a/public/javascripts/site.js +++ b/public/javascripts/site.js @@ -1,5 +1,5 @@ -function updatelinks(lon,lat,zoom) { - var links = new Array(); +function updatelinks(lon,lat,zoom,layers) { + var links = new Object(); links['viewanchor'] = '/index.html'; //links['editanchor'] = 'edit.html'; links['uploadanchor'] = '/traces'; @@ -16,6 +16,7 @@ function updatelinks(lon,lat,zoom) { args["lat"] = lat; args["lon"] = lon; args["zoom"] = zoom; + args["layers"] = layers; node.href = setArgs(node.href, args); } @@ -69,3 +70,17 @@ function setArgs(url, args) { return url.replace(/\?.*$/, "") + "?" + queryitems.join("&"); } + +function getStyle(el, property) { + var style; + + if (el.currentStyle) { + style = el.currentStyle[property]; + } else if( window.getComputedStyle ) { + style = document.defaultView.getComputedStyle(el,null).getPropertyValue(property); + } else { + style = el.style[property]; + } + + return style; +}