From 7789f8202f60f69ce015b1bc34eb0c076d7545b5 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 24 May 2020 18:38:08 +0200 Subject: animate train position in map --- templates/route_map.html.ep | 59 ++------------------------------------------- 1 file changed, 2 insertions(+), 57 deletions(-) (limited to 'templates/route_map.html.ep') diff --git a/templates/route_map.html.ep b/templates/route_map.html.ep index 6ed1b57..6f5643b 100644 --- a/templates/route_map.html.ep +++ b/templates/route_map.html.ep @@ -1,58 +1,5 @@ % if ($origin and $destination) { -
- Fahrt - % if (stash('train_no')) { - <%= stash('train_no') %> - % } - von <%= $origin->{name} %> - nach <%= $destination->{name} %> - % if (my $next = stash('next_stop')) { -
- % if ($next->{type} eq 'present' and $next->{station}{dep} and $next->{station}{arr}) { - Aufenthalt in <%= $next->{station}{name} %> - an Gleis <%= $next->{station}{platform} %> - bis <%= $next->{station}{dep}->strftime('%H:%M') %> - % if ($next->{station}{dep_delay}) { - %= sprintf('(%+d)', $next->{station}{dep_delay}) - % } - % } - % elsif ($next->{type} eq 'present' and $next->{station}{dep}) { - Abfahrt in <%= $next->{station}{name} %> - von Gleis <%= $next->{station}{platform} %> - um <%= $next->{station}{dep}->strftime('%H:%M') %> - % if ($next->{station}{dep_delay}) { - %= sprintf('(%+d)', $next->{station}{dep_delay}) - % } - % } - % elsif ($next->{type} eq 'present' and $next->{station}{arr}) { - Endstation erreicht um - <%= $next->{station}{arr}->strftime('%H:%M') %> - auf Gleis <%= $next->{station}{platform} %> - % if ($next->{station}{arr_delay}) { - %= sprintf('(%+d)', $next->{station}{arr_delay}) - % } - % } - % elsif ($next->{type} eq 'present') { - Zug steht in - <%= $next->{station}{arr}->strftime('%H:%M') %> - auf Gleis <%= $next->{station}{platform} %> - % } - % elsif ($next->{type} eq 'next' and $next->{station}{arr}) { - Nächster Halt: - <%= $next->{station}{name} %> - um <%= $next->{station}{arr}->strftime('%H:%M') %> - % if ($next->{station}{arr_delay}) { - %= sprintf('(%+d)', $next->{station}{arr_delay}) - % } - auf Gleis <%= $next->{station}{platform} %> - % } - % elsif ($next->{type} eq 'next') { - Nächster Halt: - <%= $next->{station}{name} %> - auf Gleis <%= $next->{station}{platform} %> - % } - % } -
+ %= include '_map_infobox' % }
@@ -135,9 +82,7 @@ var marker; Die eingezeichnete Route stammt aus dem HAFAS und ist im Detail oft fehlerbehaftet.
Die Zugposition auf der Karte ist eine DBF-eigene Schätzung und kann erheblich -von der tatsächlichen Position des Zugs abweichen.
-Live-Tracking mit automatischer Kartenaktualisierung wird noch nicht -unterstützt. +von den tatsächlichen Gegebenheiten abweichen.
% if (my $op = stash('operator')) { -- cgit v1.2.3