From 0a9d2e4c88f46fb8f5ea91009b16c84403d546e2 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 20 Mar 2019 18:33:51 +0100 Subject: journey: show average speed --- templates/journey.html.ep | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'templates/journey.html.ep') diff --git a/templates/journey.html.ep b/templates/journey.html.ep index a9c0c0b..4050e61 100644 --- a/templates/journey.html.ep +++ b/templates/journey.html.ep @@ -78,12 +78,17 @@ Entfernung - % my $distance = get_travel_distance($journey->{from_name}, $journey->{to_name}, $journey->{route}); - % my $beeline = get_travel_distance($journey->{from_name}, $journey->{to_name}, [$journey->{from_name}, $journey->{to_name}]); - % if ($distance > 0.1) { - ca. <%= sprintf('%.f', $distance) %> km + % if ($journey->{km_route} > 0.1) { + ca. <%= sprintf('%.f', $journey->{km_route}) %> km % } - (Luftlinie: <%= sprintf('%.f', $beeline) %> km) + (Luftlinie: <%= sprintf('%.f', $journey->{km_beeline}) %> km) + + + + Geschwindigkeit + + ∅ <%= sprintf('%.f', $journey->{kmh_route}) %> km/h + (<%= sprintf('%.f', $journey->{kmh_beeline}) %> km/h) -- cgit v1.2.3