app/views/access_points/show.kml.erb
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Placemark id="<%= @access_point.id %>" >
<name><%= @access_point.name %></name>
<access_point_type><%= @access_point.access_point_type %></access_point_type>
<%= (@access_point.position or @access_point.default_position).kml_representation.html_safe %>
</Placemark>
</Document>
</kml>