+ function noteUnselected(o) {
+ var feature = o.feature;
+
+ map.removePopup(feature.popup);
+ delete feature.popup;
+ }
+
+ function addNote() {
+ map.noteLayer.setVisibility(true);
+ map.noteLayer.addNote(map.getCenter());
+ }
+
+ function allowNoteReports() {
+ if (map.getZoom() > 11) {
+ $("createnoteanchor").style.visibility = "visible";
+ } else {
+ $("createnoteanchor").style.visibility = "hidden";
+ }
+ }
+
+ document.observe("dom:loaded", mapInit);
+ document.observe("dom:loaded", installEditHandler);
+ document.observe("dom:loaded", handleResize);
+
+ Event.observe(window, "resize", function() {
+ var centre = map.getCenter();
+ var zoom = map.getZoom();
+
+ handleResize();
+
+ map.setCenter(centre, zoom);
+ });