diff options
| author | Michel Etienne | 2012-11-13 16:18:13 +0100 |
|---|---|---|
| committer | Michel Etienne | 2012-11-13 16:18:13 +0100 |
| commit | eeaf81e645de6f073b84b22b19e04ac63024399e (patch) | |
| tree | 5c0664cc51d2ad7d42ec8ff3322d540ac2413972 /app/views/access_links | |
| parent | 0c9781ac6c9927c4631826c2319c0c14436587d6 (diff) | |
| download | chouette-core-eeaf81e645de6f073b84b22b19e04ac63024399e.tar.bz2 | |
add some features on maps
Diffstat (limited to 'app/views/access_links')
| -rw-r--r-- | app/views/access_links/show.html.erb | 1 | ||||
| -rw-r--r-- | app/views/access_links/show.kml.erb | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/app/views/access_links/show.html.erb b/app/views/access_links/show.html.erb index aa049899a..a318a84c6 100644 --- a/app/views/access_links/show.html.erb +++ b/app/views/access_links/show.html.erb @@ -1,6 +1,7 @@ <%= title_tag t('access_links.show.title', :access_link => @access_link.name ) %> <div class="access_link_show"> + <%= @map.to_html %> <div class="summary"> <p> diff --git a/app/views/access_links/show.kml.erb b/app/views/access_links/show.kml.erb new file mode 100644 index 000000000..25e4351b8 --- /dev/null +++ b/app/views/access_links/show.kml.erb @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<kml xmlns="http://www.opengis.net/kml/2.2"> + <Document> + <% if @access_link.geometry %> + <Placemark id="route_<%= @access_link.id %>" > + <name><%= @access_link.name %></name> + <%= @access_link.geometry.kml_representation.html_safe %> + </Placemark> + <Placemark id="<%= @access_link.access_point.id %>" > + <departure><%= @access_link.link_orientation_type == "access_point_to_stop_area" %></departure> + <%= @access_link.access_point.geometry.kml_representation.html_safe %> + </Placemark> + <Placemark id="<%= @access_link.stop_area.id %>" > + <arrival><%= @access_link.link_orientation_type == "access_point_to_stop_area" %></arrival> + <%= @access_link.stop_area.geometry.kml_representation.html_safe %> + </Placemark> + <% end %> + </Document> +</kml> + |
