From 349b9f813f07da61ca117f49d1a3746979dffac8 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Fri, 17 Jun 2011 23:09:05 +0100 Subject: Centralise UK location check to catch edge cases. --- perllib/FixMyStreet/Geocode.pm | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'perllib/FixMyStreet/Geocode.pm') 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); } -- cgit v1.2.3