aboutsummaryrefslogtreecommitdiff
path: root/app/views/sections/show.html.erb
blob: 9a69891b11a5f987cbb7f5342672f5a1c4d83efa (plain)
1
2
3
4
5
6
7
8
9
10
11
<pre><code lang="ecmascript">
// 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)

</code></pre>