From 63d0fd79fb9e797dc981a169ef9f83d5b1bbe4dc Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 5 Jan 2020 15:55:33 +0100 Subject: Map: Show estimated train position --- templates/route_map.html.ep | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'templates') diff --git a/templates/route_map.html.ep b/templates/route_map.html.ep index 4ba5917..4b38fc4 100644 --- a/templates/route_map.html.ep +++ b/templates/route_map.html.ep @@ -46,4 +46,19 @@ for (var station_id in stations) { }).bindPopup(stations[station_id][1].join('
')).addTo(map); } +var marker; +% for my $marker (@{stash('markers') // [] } ) { + marker = L.marker([<%= $marker->{lat} %>,<%= $marker->{lon} %>]).addTo(map); + % if ($marker->{title}) { + marker.bindPopup('<%= $marker->{title} %>'); + % } +% } + + +
+Die Zugposition auf der Karte ist eine Schätzung und kann erheblich von der +tatsächlichen Position des Zugs abweichen. +Live-Tracking mit automatischer Kartenaktualisierung wird noch nicht +unterstützt. +
-- cgit v1.2.3