- <% unless OSM_STATUS == :api_offline or OSM_STATUS == :database_offline %>
- map.dataLayer = new OpenLayers.Layer("<%= I18n.t 'browse.start_rjs.data_layer_name' %>", { "visibility": false });
- map.dataLayer.events.register("visibilitychanged", map.dataLayer, toggleData);
- map.addLayer(map.dataLayer);
+ <% unless STATUS == :api_offline or STATUS == :database_offline %>
+ map.dataLayer = new OpenLayers.Layer("<%= I18n.t 'browse.start_rjs.data_layer_name' %>", { "visibility": false });
+ map.dataLayer.events.register("visibilitychanged", map.dataLayer, toggleData);
+ map.addLayer(map.dataLayer);
+
+ map.noteLayer = new OpenLayers.Layer.Notes("Notes", {
+ setCookie: false,
+ permalinkURL: "http://www.openstreetmap.org/",
+ visibility: <%= params[:notes] == "yes" %>
+ });
+ map.addLayer(map.noteLayer);
+
+ map.noteControl = new OpenLayers.Control.Notes(map.noteLayer);
+ map.addControl(map.noteControl);
+
+ $("createnoteanchor").observe("click", addNote);
+
+ map.events.register("zoomend", map, allowNoteReports);