+
+ map.osbLayer = new OpenLayers.Layer.OpenStreetBugs("OpenStreetBugs", {
+ serverURL: "/api/0.6/",
+ iconOpen: new OpenLayers.Icon("<%= image_path "open_bug_marker.png" %>", new OpenLayers.Size(22, 22), new OpenLayers.Pixel(-11, -11)),
+ iconClosed: new OpenLayers.Icon("<%= image_path "closed_bug_marker.png" %>", new OpenLayers.Size(22, 22), new OpenLayers.Pixel(-11, -11)),
+ readonly: false,
+ setCookie: false,
+ permalinkURL: "http://www.openstreetmap.org/",
+ theme: "<%= stylesheet_path "openstreetbugs" %>",
+ visibility: false
+ });
+ map.addLayer(map.osbLayer);
+
+ map.osbControl = new OpenLayers.Control.OpenStreetBugs(map.osbLayer);
+ map.addControl(map.osbControl);
+
+ $("reportbuganchor").observe("click", addBug);
+
+ map.events.register("zoomend", map, allowBugReports);