<% unless STATUS == :api_offline or STATUS == :database_offline -%>
<% content_for :editmenu do -%>
+ <li><%= link_to t("browse.start_rjs.notes_layer_name"), "#", :id => "show_notes" %></li>
<li><%= link_to t("browse.start_rjs.data_layer_name"), "#", :id => "show_data" %></li>
<% end -%>
<% end -%>
});
map.addLayer(map.dataLayer);
- var noteLayer = addNoteLayer(map, "<%= notes_url :format => 'json' %>", $("#createnoteanchor"), 11);
+ map.noteLayer = addNoteLayer(map, "<%= notes_url :format => 'json' %>", $("#createnoteanchor"), 11);
<% if params[:notes] == "yes" -%>
- noteLayer.setVisibility(true);
+ map.noteLayer.setVisibility(true);
<% end -%>
<% end %>
}
$(document).ready(function () {
+ $("#show_notes").click(function () {
+ map.noteLayer.setVisibility(true);
+ });
+
$("#show_data").click(function () {
$.ajax({ url: "<%= url_for :controller => :browse, :action => :start %>" });
});