Skip to content

Commit

Permalink
Stations: Remove get_latlon_by_name (no longer needed)
Browse files Browse the repository at this point in the history
  • Loading branch information
derf committed Jul 21, 2024
1 parent fa20c21 commit 7811520
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions lib/Travelynx/Model/Stations.pm
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,6 @@ sub get_by_evas {
return @ret;
}

# Slow
sub get_latlon_by_name {
my ( $self, %opt ) = @_;

my $db = $opt{db} // $self->{pg}->db;

my %location;
my $res = $db->select( 'stations', [ 'name', 'lat', 'lon' ] );
while ( my $row = $res->hash ) {
$location{ $row->{name} } = [ $row->{lat}, $row->{lon} ];
}
return \%location;
}

# Slow
sub get_by_name {
my ( $self, $name, %opt ) = @_;
Expand Down

0 comments on commit 7811520

Please sign in to comment.