afimb/chouette2

View on GitHub
app/views/stop_areas/index.kml.erb

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <% @stop_areas.where("latitude is not null and longitude is not null").each do |stop_area| %>
      <Placemark id="<%= stop_area.id %>" >
        <name><%= stop_area.name %></name>
        <stop_area_type><%= stop_area.stop_area_type %></stop_area_type>
        <stop_area_type_label><%= t("area_types.label.#{stop_area.stop_area_type}") %></stop_area_type_label>
        <%= stop_area.geometry.kml_representation.html_safe %>
      </Placemark>
    <% end %>
  </Document>
</kml>