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

Trip->polyline: optionally fall back to beeline between stops

parent 12460afd
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -46,7 +46,11 @@ sub new {
}

sub polyline {
	my ($self) = @_;
	my ( $self, %opt ) = @_;

	if ( $opt{fallback} and not @{ $self->{polyline} // [] } ) {
		return map { $_->{latlon} } $self->route;
	}

	return @{ $self->{polyline} // [] };
}