// First, create a section layer on the map, then assign all resource markers to it.
sec<%= @section.id %> = L.layerGroup

<% @section.resources.each_with_index do |res, i| %>
mk_<%= i %> = L.marker([<%= res.latitude %>, <%= res.longitude %>]).addTo(sec<%= @section.id %>)
<% end %>

sec<%= @section.id %>.addTo(map)