X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/4a23ee8baf90c3729ad44ff75748670cfdebf6ad..43e12e7d02307ad92cc51ebd09f4e88a466168aa:/app/views/site/index.html.erb diff --git a/app/views/site/index.html.erb b/app/views/site/index.html.erb index 08bada0b9..b668627a0 100644 --- a/app/views/site/index.html.erb +++ b/app/views/site/index.html.erb @@ -25,7 +25,7 @@
@@ -133,11 +133,6 @@ end var loginName = "<%= @user.display_name %>" <% end %> - function createBugCallBack() { - map.osbControl.deactivate(); - document.getElementById("OpenLayers.Map_18_OpenLayers_Container").style.cursor = "default"; - } - function mapInit(){ map = createMap("map"); @@ -155,7 +150,8 @@ end cookieLifetime : 1000, cookiePath : "/my/map/", permalinkURL : "http://www.openstreetmap.org/", - theme : "/stylesheets/openstreetbugs.css" + theme : "/stylesheets/openstreetbugs.css", + visibility : false }); map.addLayer(map.osbLayer); @@ -168,6 +164,9 @@ end lBug.addEventListener('click',function (e) { map.osbControl.activate(); document.getElementById("OpenLayers.Map_18_OpenLayers_Container").style.cursor = "crosshair" },false); + map.events.register("zoomend",map,function () { var zoom = map.getZoom(); var lBug = document.getElementById('ReportBug') + if (zoom > 11) { lBug.style.visibility = 'visible';} else {lBug.style.visibility = "hidden";}}); + <% end %>