diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-06-29 16:32:39 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-06-29 22:44:06 +0100 |
commit | 00567425ca491a8fc69770246357a4569f450455 (patch) | |
tree | d21f5a1e52be26af070c0db12be62b099aeb797f /perllib/FixMyStreet/Geocode.pm | |
parent | c280404d39709f01005d9292546762f3802c7bf3 (diff) |
Skip non-UK results in Bing geocoder, remove some geocode tests.
Diffstat (limited to 'perllib/FixMyStreet/Geocode.pm')
-rw-r--r-- | perllib/FixMyStreet/Geocode.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Geocode.pm b/perllib/FixMyStreet/Geocode.pm index 64e8e567d..286a10105 100644 --- a/perllib/FixMyStreet/Geocode.pm +++ b/perllib/FixMyStreet/Geocode.pm @@ -185,8 +185,8 @@ sub string_bing { my ( $error, @valid_locations, $latitude, $longitude ); foreach (@$results) { my $address = $_->{name}; + next unless $_->{address}->{countryRegion} eq 'United Kingdom'; # FIXME This is UK only ( $latitude, $longitude ) = @{ $_->{point}->{coordinates} }; - # TODO Check $_->{address}->{countryRegion} for cobrand push (@$error, $address); push (@valid_locations, $_); } |