X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/001ff5764bcf15aaa179dc5c7844038676536622..c322b0c298ddbf11fdd2c7cf541cefde0f2b5e55:/app/views/site/index.html.erb
diff --git a/app/views/site/index.html.erb b/app/views/site/index.html.erb
index 70402a1c9..5d78b2340 100644
--- a/app/views/site/index.html.erb
+++ b/app/views/site/index.html.erb
@@ -25,7 +25,7 @@
@@ -129,10 +129,9 @@ end
OpenLayers.Lang.setCode("<%= I18n.locale.to_s %>");
- function createBugCallBack() {
- map.osbControl.deactivate();
- document.getElementById("map_OpenLayers_Container").style.cursor = "default";
- }
+ <% if @user %>
+ var loginName = "<%= @user.display_name %>"
+ <% end %>
function mapInit(){
map = createMap("map");
@@ -144,24 +143,28 @@ end
map.osbLayer = new OpenLayers.Layer.OpenStreetBugs("OpenStreetBugs", {
serverURL : "/api/0.6/",
- iconOpen : new OpenLayers.Icon("http://openstreetbugs.schokokeks.org/client/open_bug_marker.png", new OpenLayers.Size(22, 22), new OpenLayers.Pixel(-11, -11)),
- iconClosed : new OpenLayers.Icon("http://openstreetbugs.schokokeks.org/client/closed_bug_marker.png", new OpenLayers.Size(22, 22), new OpenLayers.Pixel(-11, -11)),
+ iconOpen : new OpenLayers.Icon("/images/open_bug_marker.png", new OpenLayers.Size(22, 22), new OpenLayers.Pixel(-11, -11)),
+ iconClosed : new OpenLayers.Icon("/images/closed_bug_marker.png", new OpenLayers.Size(22, 22), new OpenLayers.Pixel(-11, -11)),
readonly : false,
setCookie : false,
cookieLifetime : 1000,
cookiePath : "/my/map/",
permalinkURL : "http://www.openstreetmap.org/",
- theme : "http://osm.cdauth.de/map/openstreetbugs.css"
+ theme : "/stylesheets/openstreetbugs.css"
});
map.addLayer(map.osbLayer);
map.osbControl = new OpenLayers.Control.OpenStreetBugs(map.osbLayer);
+
map.addControl(map.osbControl);
var lBug = document.getElementById('ReportBug');
lBug.addEventListener('click',function (e) {
- map.osbControl.activate(); document.getElementById("map_OpenLayers_Container").style.cursor = "crosshair"; if (e.stopPropagation) e.stopPropagation(); },false);
+ 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 %>