aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Geocode
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-07-13 10:39:46 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-07-20 14:01:18 +0100
commitc88225882f16eef4a2f3002ea448c00fbbcf3713 (patch)
treed90d62778c405a0f84c9fdd7100247b8ad8e4be8 /perllib/FixMyStreet/Geocode
parent0485616398282c41cac9b3c96d99a752b1839f1f (diff)
Remove any Northern Ireland specific code.
Diffstat (limited to 'perllib/FixMyStreet/Geocode')
-rw-r--r--perllib/FixMyStreet/Geocode/Bing.pm10
-rw-r--r--perllib/FixMyStreet/Geocode/Google.pm3
2 files changed, 1 insertions, 12 deletions
diff --git a/perllib/FixMyStreet/Geocode/Bing.pm b/perllib/FixMyStreet/Geocode/Bing.pm
index 13542347d..18e6b56ce 100644
--- a/perllib/FixMyStreet/Geocode/Bing.pm
+++ b/perllib/FixMyStreet/Geocode/Bing.pm
@@ -52,15 +52,11 @@ sub string {
}
my $results = $js->{resourceSets}->[0]->{resources};
- my ( $error, @valid_locations, $latitude, $longitude, $ni );
+ my ( $error, @valid_locations, $latitude, $longitude );
foreach (@$results) {
my $address = $_->{name};
next if $params->{bing_country} && $_->{address}->{countryRegion} ne $params->{bing_country};
- if ($params->{bing_country} eq 'United Kingdom' && $_->{address}{adminDistrict} eq 'Northern Ireland') {
- $ni = 1;
- next;
- }
# Getting duplicate, yet different, results from Bing sometimes
next if @valid_locations
@@ -82,10 +78,6 @@ sub string {
push (@valid_locations, $_);
}
- if ($ni && !scalar @valid_locations) {
- return { error => _("We do not currently cover Northern Ireland, I'm afraid.") };
- }
-
return { latitude => $latitude, longitude => $longitude } if scalar @valid_locations == 1;
return { error => $error };
}
diff --git a/perllib/FixMyStreet/Geocode/Google.pm b/perllib/FixMyStreet/Geocode/Google.pm
index 0d568f8f1..db3a8ae91 100644
--- a/perllib/FixMyStreet/Geocode/Google.pm
+++ b/perllib/FixMyStreet/Geocode/Google.pm
@@ -62,9 +62,6 @@ sub string {
if (!$js) {
return { error => _('Sorry, we could not parse that location. Please try again.') };
- } elsif ($js =~ /BT\d/) {
- # Northern Ireland, hopefully
- return { error => _("We do not currently cover Northern Ireland, I'm afraid.") };
}
$js = JSON->new->utf8->allow_nonref->decode($js);