Loading lib/DBInfoscreen/Controller/Map.pm +26 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,9 @@ sub route { my $trip_id = $self->stash('tripid'); my $line_no = $self->stash('lineno'); my $from_name = $self->param('from'); my $to_name = $self->param('to'); $self->render_later; $self->get_hafas_polyline_p( $trip_id, $line_no )->then( Loading Loading @@ -102,6 +105,29 @@ sub route { my @stop_lines = ( $stop->{stop}{name} ); my ( $platform, $arr, $dep, $arr_delay, $dep_delay ); if ( $from_name and $stop->{stop}{name} eq $from_name ) { push( @markers, { lon => $stop->{stop}{location}{longitude}, lat => $stop->{stop}{location}{latitude}, title => $stop->{stop}{name}, icon => 'greenIcon', } ); } if ( $to_name and $stop->{stop}{name} eq $to_name ) { push( @markers, { lon => $stop->{stop}{location}{longitude}, lat => $stop->{stop}{location}{latitude}, title => $stop->{stop}{name}, icon => 'goldIcon', } ); } if ( $stop->{arrival} and $arr = $strp->parse_datetime( $stop->{arrival} ) ) { Loading lib/DBInfoscreen/Controller/Stationboard.pm +1 −0 Original line number Diff line number Diff line Loading @@ -1273,6 +1273,7 @@ sub handle_request { linetype => $linetype, icetype => $self->app->ice_type_map->{ $departure->{train_no} }, dt_now => DateTime->now( time_zone => 'Europe/Berlin' ), station_name => $data->{station_name} // $station, ); } else { Loading public/static/leaflet/images/marker-icon-2x-gold.png 0 → 100644 +4.17 KiB Loading image diff... public/static/leaflet/images/marker-icon-2x-green.png 0 → 100644 +4.1 KiB Loading image diff... templates/_train_details.html.ep +1 −1 Original line number Diff line number Diff line Loading @@ -85,7 +85,7 @@ % } % if ($departure->{trip_id}) { <div class="verbose"> <a href="/map/<%= $departure->{trip_id} %>/<%= $departure->{train_line} // 0 %>">Karte</a> <a href="/map/<%= $departure->{trip_id} %>/<%= $departure->{train_line} // 0 %>?from=<%= $station_name %>">Karte</a> </div> % } Loading Loading
lib/DBInfoscreen/Controller/Map.pm +26 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,9 @@ sub route { my $trip_id = $self->stash('tripid'); my $line_no = $self->stash('lineno'); my $from_name = $self->param('from'); my $to_name = $self->param('to'); $self->render_later; $self->get_hafas_polyline_p( $trip_id, $line_no )->then( Loading Loading @@ -102,6 +105,29 @@ sub route { my @stop_lines = ( $stop->{stop}{name} ); my ( $platform, $arr, $dep, $arr_delay, $dep_delay ); if ( $from_name and $stop->{stop}{name} eq $from_name ) { push( @markers, { lon => $stop->{stop}{location}{longitude}, lat => $stop->{stop}{location}{latitude}, title => $stop->{stop}{name}, icon => 'greenIcon', } ); } if ( $to_name and $stop->{stop}{name} eq $to_name ) { push( @markers, { lon => $stop->{stop}{location}{longitude}, lat => $stop->{stop}{location}{latitude}, title => $stop->{stop}{name}, icon => 'goldIcon', } ); } if ( $stop->{arrival} and $arr = $strp->parse_datetime( $stop->{arrival} ) ) { Loading
lib/DBInfoscreen/Controller/Stationboard.pm +1 −0 Original line number Diff line number Diff line Loading @@ -1273,6 +1273,7 @@ sub handle_request { linetype => $linetype, icetype => $self->app->ice_type_map->{ $departure->{train_no} }, dt_now => DateTime->now( time_zone => 'Europe/Berlin' ), station_name => $data->{station_name} // $station, ); } else { Loading
templates/_train_details.html.ep +1 −1 Original line number Diff line number Diff line Loading @@ -85,7 +85,7 @@ % } % if ($departure->{trip_id}) { <div class="verbose"> <a href="/map/<%= $departure->{trip_id} %>/<%= $departure->{train_line} // 0 %>">Karte</a> <a href="/map/<%= $departure->{trip_id} %>/<%= $departure->{train_line} // 0 %>?from=<%= $station_name %>">Karte</a> </div> % } Loading