diff options
author | Matthew Somerville <matthew@fury.ukcod.org.uk> | 2011-02-11 11:14:20 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@fury.ukcod.org.uk> | 2011-02-11 11:14:20 +0000 |
commit | 947f5f9d6c9c74bc5acea7fbc605b653e44f7ce7 (patch) | |
tree | 05f70a75d4f473274e897e8951ff71035c1890fb /perllib/FixMyStreet/Geocode.pm | |
parent | c8a9805bcb850cab7bf1c1b8c34ef5c4f22e1b73 (diff) |
Helper function for all latlon to OSGB36 calls.
Diffstat (limited to 'perllib/FixMyStreet/Geocode.pm')
-rw-r--r-- | perllib/FixMyStreet/Geocode.pm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/Geocode.pm b/perllib/FixMyStreet/Geocode.pm index 9ab958cd9..14cedbaeb 100644 --- a/perllib/FixMyStreet/Geocode.pm +++ b/perllib/FixMyStreet/Geocode.pm @@ -18,8 +18,8 @@ use URI::Escape; use Cobrand; use Page; +use Utils; use mySociety::Config; -use mySociety::GeoUtil; use mySociety::Locale; use mySociety::MaPit; use mySociety::PostcodeUtil; @@ -63,9 +63,7 @@ sub geocoded_string_coordinates { $longitude = $1; $latitude = $2; try { - my ($easting, $northing) = mySociety::Locale::in_gb_locale { - mySociety::GeoUtil::wgs84_to_national_grid($latitude, $longitude, 'G'); - }; + my ($easting, $northing) = Utils::convert_latlon_to_en( $latitude, $longitude ); } catch Error::Simple with { $error = shift; $error = _('That location does not appear to be in Britain; please try again.') |