diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-07-10 19:17:48 +0200 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-07-10 19:17:48 +0200 |
commit | d6cca3f837337c12095cb71f694f68fb66cc4ccb (patch) | |
tree | fafd5f0265921b1eecec02cf1ca348a0ce2174b4 /templates | |
parent | 24a01da9e9555edc3b1097b49db036f7e14e27cc (diff) |
in transit: show estimated train position and full route (greyed out)2.15.13
Diffstat (limited to 'templates')
-rw-r--r-- | templates/_checked_in.html.ep | 2 | ||||
-rw-r--r-- | templates/_map.html.ep | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep index 91f1ce7..e1cefe6 100644 --- a/templates/_checked_in.html.ep +++ b/templates/_checked_in.html.ep @@ -362,7 +362,7 @@ <span class="card-title">Karte</span> <div id="map" style="height: 70vh;"> </div> - %= include '_map', with_map_header => 0, station_coordinates => stash('station_coordinates'), polyline_groups => stash('polyline_groups') + %= include '_map', with_map_header => 0, station_coordinates => stash('station_coordinates'), polyline_groups => stash('polyline_groups'), markers => stash('markers') </div> </div> % if ($journey->{extra_data}{manual}) { diff --git a/templates/_map.html.ep b/templates/_map.html.ep index 223bd68..93f116a 100644 --- a/templates/_map.html.ep +++ b/templates/_map.html.ep @@ -39,6 +39,15 @@ var pl; % } % } +% for my $marker (@{stash('markers') // []}) { + % if ($marker->[0] and $marker->[0][0] and $marker->[1]) { + { + const marker = L.marker([<%= $marker->[0][0] %>, <%= $marker->[0][1] %>]).addTo(map); + marker.bindPopup('<%= $marker->[1] %>'); + } + % } +% } + % if (my $b = stash('bounds')) { map.fitBounds([[<%= $b->[0][0] %>,<%= $b->[0][1] %>],[<%= $b->[1][0] %>,<%= $b->[1][1] %>]]); % } @@ -48,8 +57,8 @@ for (var station_id in stations) { color: '#f03', opacity: 0.7, fillColor: '#f03', - fillOpacity: 0.5, - radius: 250 + fillOpacity: 0.2, + radius: 200 }).bindPopup(stations[station_id][1]).addTo(map); } |