diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-01-05 11:09:08 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-01-05 11:09:08 +0100 |
commit | 06e65334b39b210c367256d128df5de9e1b29425 (patch) | |
tree | 1c77e0c3e416e4b62c6c4baaa776c399c54fe0ef /templates/route_map.html.ep | |
parent | 7e825ba8a3480773e42823756355ff5e2367586c (diff) |
map: show arr/dep times2.5.3
Diffstat (limited to 'templates/route_map.html.ep')
-rw-r--r-- | templates/route_map.html.ep | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/templates/route_map.html.ep b/templates/route_map.html.ep index 215444f..4ba5917 100644 --- a/templates/route_map.html.ep +++ b/templates/route_map.html.ep @@ -1,4 +1,9 @@ - <div class="container"> +<div class="container" style="margin-top: 1ex; margin-bottom: 1ex;"> +Fahrt von <strong><%= $origin->{name} %></strong> +nach <strong><%= $destination->{name} %></strong> +</div> + +<div class="container"> <div id="map" style="height: 500px;"> </div> </div> @@ -11,7 +16,7 @@ L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { }).addTo(map); var stations = [ % for my $station ( @{stash('station_coordinates') // [] } ) { -[[<%= $station->[0][0] %>,<%= $station->[0][1] %>],'<%= $station->[1] %>'], +[[<%= $station->[0][0] %>,<%= $station->[0][1] %>],['<%== join("','", map { Mojo::Util::xml_escape($_) } @{$station->[1]}) %>']], % } ]; @@ -38,7 +43,7 @@ for (var station_id in stations) { fillColor: '#f03', fillOpacity: 0.5, radius: 250 - }).bindPopup(stations[station_id][1]).addTo(map); + }).bindPopup(stations[station_id][1].join('<br/>')).addTo(map); } </script> |