aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/Geocode.pm2
-rw-r--r--t/app/controller/around.t25
2 files changed, 1 insertions, 26 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, $_);
}
diff --git a/t/app/controller/around.t b/t/app/controller/around.t
index ba0dfe1b4..0060e957c 100644
--- a/t/app/controller/around.t
+++ b/t/app/controller/around.t
@@ -41,21 +41,6 @@ foreach my $test (
pc_alternatives => [],
},
{
- pc => 'glenthorpe',
- errors => [],
- pc_alternatives => [
- 'Glenthorpe Crescent, Leeds LS9 7',
- 'Glenthorpe Rd, Merton, Greater London SM4 4',
- 'Glenthorpe Ave, Leeds LS9 7',
- 'Glenthorne Rd, Hammersmith, Greater London W6 0',
- 'Glenthorne Ave, Yeovil, Somerset BA21 4',
- 'Glenthorne Rd, Kenwyn, Cornwall TR3 6',
- 'Glenthorne Dr, Cheslyn Hay, Staffordshire WS6 7',
- 'Glenthorne Gardens, Ilford, Greater London IG5 0',
- 'Glenthorne Ave, Croydon, Greater London CR0 7',
- ],
- },
- {
pc => 'Glenthorpe Ct, Katy, TX 77494, USA',
errors =>
['Sorry, we could not find that location.'],
@@ -81,16 +66,6 @@ foreach my $test (
latitude => '51.50101',
longitude => '-0.141587',
},
- {
- pc => 'Manchester',
- latitude => '53.480713',
- longitude => '-2.234376',
- },
- {
- pc => 'Glenthorpe Rd, Merton, Greater London SM4 4, UK',
- latitude => '51.3938',
- longitude => '-0.22096',
- },
)
{
subtest "check lat/lng for '$test->{pc}'" => sub {