From 06e65334b39b210c367256d128df5de9e1b29425 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 5 Jan 2020 11:09:08 +0100 Subject: map: show arr/dep times --- templates/route_map.html.ep | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'templates/route_map.html.ep') 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 @@ -
+
+Fahrt von <%= $origin->{name} %> +nach <%= $destination->{name} %> +
+ +
@@ -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('
')).addTo(map); } -- cgit v1.2.3