summaryrefslogtreecommitdiff
path: root/lib/Travel/Status
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status')
-rw-r--r--lib/Travel/Status/DE/EFA/Trip.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/EFA/Trip.pm b/lib/Travel/Status/DE/EFA/Trip.pm
index 658dffe..4c495dd 100644
--- a/lib/Travel/Status/DE/EFA/Trip.pm
+++ b/lib/Travel/Status/DE/EFA/Trip.pm
@@ -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} // [] };
}