diff options
Diffstat (limited to 'perllib/FixMyStreet/Geocode')
-rw-r--r-- | perllib/FixMyStreet/Geocode/Bing.pm | 3 | ||||
-rw-r--r-- | perllib/FixMyStreet/Geocode/Google.pm | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/Geocode/Bing.pm b/perllib/FixMyStreet/Geocode/Bing.pm index d7db10ae6..a846f3348 100644 --- a/perllib/FixMyStreet/Geocode/Bing.pm +++ b/perllib/FixMyStreet/Geocode/Bing.pm @@ -8,6 +8,7 @@ package FixMyStreet::Geocode::Bing; use strict; +use FixMyStreet::Geocode; use Utils; # string STRING CONTEXT @@ -71,7 +72,7 @@ sub reverse { my ( $latitude, $longitude, $bing_culture ) = @_; # Get nearest road-type thing from Bing - my $key = mySociety::Config::get('BING_MAPS_API_KEY', ''); + my $key = FixMyStreet->config('BING_MAPS_API_KEY', ''); if ($key) { my $url = "http://dev.virtualearth.net/REST/v1/Locations/$latitude,$longitude?key=$key"; $url .= '&c=' . $bing_culture if $bing_culture; diff --git a/perllib/FixMyStreet/Geocode/Google.pm b/perllib/FixMyStreet/Geocode/Google.pm index 5261bb7e4..e64d02c4c 100644 --- a/perllib/FixMyStreet/Geocode/Google.pm +++ b/perllib/FixMyStreet/Geocode/Google.pm @@ -53,7 +53,7 @@ sub string { next unless $c->cobrand->geocoded_string_check( $address ); ( $longitude, $latitude ) = map { Utils::truncate_coordinate($_) } - ($_->{geometry}{location}{lat}, $_->{geometry}{location}{lng}); + ($_->{geometry}{location}{lng}, $_->{geometry}{location}{lat}); push (@$error, { address => $address, latitude => $latitude, |