diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-06-17 23:09:05 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-06-17 23:09:05 +0100 |
commit | 349b9f813f07da61ca117f49d1a3746979dffac8 (patch) | |
tree | 9661963edc9187063a97f8d4930c71bb17698e24 /perllib/FixMyStreet/Geocode.pm | |
parent | 5153ba514d7f4d8889ad55e8b1b7b18da63644d2 (diff) |
Centralise UK location check to catch edge cases.
Diffstat (limited to 'perllib/FixMyStreet/Geocode.pm')
-rw-r--r-- | perllib/FixMyStreet/Geocode.pm | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/perllib/FixMyStreet/Geocode.pm b/perllib/FixMyStreet/Geocode.pm index 423cec9b6..d5cc7f1d3 100644 --- a/perllib/FixMyStreet/Geocode.pm +++ b/perllib/FixMyStreet/Geocode.pm @@ -10,14 +10,12 @@ package FixMyStreet::Geocode; use strict; use Encode; -use Error qw(:try); use File::Slurp; use File::Path (); use LWP::Simple; use Digest::MD5 qw(md5_hex); use URI::Escape; -use Utils; use mySociety::Config; use mySociety::Locale; use mySociety::MaPit; @@ -72,16 +70,6 @@ sub geocoded_string_coordinates { } elsif ( $js =~ /"coordinates" *: *\[ *(.*?), *(.*?),/ ) { $longitude = $1; $latitude = $2; - if ( $c->cobrand->country eq 'GB') { - try { - my ($easting, $northing) = Utils::convert_latlon_to_en( $latitude, $longitude ); - } catch Error::Simple with { - mySociety::Locale::pop(); # We threw exception, so it won't have happened. - $error = shift; - $error = _('That location does not appear to be in Britain; please try again.') - if $error =~ /out of the area covered/; - } - } } return ($latitude, $longitude, $error); } |