Unverified Commit 6badbd4d authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Also support polyline export for journeys without a polyline

parent d2724d35
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2153,7 +2153,15 @@ sub journey_details {
	if ($journey) {

		if ( $self->stash('polyline_export') ) {

			if ( not( $journey->{polyline} and @{ $journey->{polyline} } ) ) {
				$journey->{polyline}
				  = [ map { [ $_->[2]{lon}, $_->[2]{lat}, $_->[1] ] }
					  @{ $journey->{route} } ];
			}

			delete $self->stash->{layout};

			my $xml = $self->render_to_string(
				template => 'polyline',
				name     => sprintf( '%s %s: %s → %s',