diff options
Diffstat (limited to 'lib/DBInfoscreen/Controller/Map.pm')
-rw-r--r-- | lib/DBInfoscreen/Controller/Map.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/DBInfoscreen/Controller/Map.pm b/lib/DBInfoscreen/Controller/Map.pm index f3f3f16..ba63d92 100644 --- a/lib/DBInfoscreen/Controller/Map.pm +++ b/lib/DBInfoscreen/Controller/Map.pm @@ -12,6 +12,7 @@ use DateTime; use DateTime::Format::Strptime; use GIS::Distance; use List::Util qw(); +use Travel::Status::DE::EFA; my $strp = DateTime::Format::Strptime->new( pattern => '%Y-%m-%dT%H:%M:%S%z', @@ -537,12 +538,15 @@ sub ajax_route { sub coverage { my ($self) = @_; - my $backend = $self->stash('backend'); + my $backend = lc( $self->stash('backend') ); my $service = $self->stash('service'); my $coverage = {}; - if ( $backend eq 'HAFAS' ) { + if ( $backend eq 'efa' ) { + $coverage = $self->efa->get_coverage($service); + } + elsif ( $backend eq 'hafas' ) { $coverage = $self->hafas->get_coverage($service); } |