- <% @overlays.sort_by { |layer| layer[:name] }.each do |layer| -%>
- // Add <%= layer[:name] %> to layer switcher
- layers.addOverlay(L.tileLayer(<%= layer[:url].to_json %>, {
- attribution: <%= layer[:attribution].to_json %>,
- maxZoom: <%= layer[:maxZoom].to_json %>
- }), <%= layer[:name].to_json %>);