aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Geocode/Zurich.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2015-02-13 12:25:34 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2015-02-13 12:25:34 +0000
commitd2569bfe991ce1635131a1b1cf67cd55c3f258a4 (patch)
tree99a9e07df04f8f8b25becf61cd09625ac1750694 /perllib/FixMyStreet/Geocode/Zurich.pm
parent0db002a977d00d0a6e11333e190de4746e009bfb (diff)
parentda63f72c27e16d491f9103b9a8cbdb2fd96d2b59 (diff)
Merge branch 'issues/fms-mobile/190'
Conflicts: perllib/FixMyStreet/Geocode/Google.pm
Diffstat (limited to 'perllib/FixMyStreet/Geocode/Zurich.pm')
-rw-r--r--perllib/FixMyStreet/Geocode/Zurich.pm18
1 files changed, 9 insertions, 9 deletions
diff --git a/perllib/FixMyStreet/Geocode/Zurich.pm b/perllib/FixMyStreet/Geocode/Zurich.pm
index d0355e1e5..aad918b0e 100644
--- a/perllib/FixMyStreet/Geocode/Zurich.pm
+++ b/perllib/FixMyStreet/Geocode/Zurich.pm
@@ -15,7 +15,7 @@ use Digest::MD5 qw(md5_hex);
use File::Path ();
use Geo::Coordinates::CH1903;
use Storable;
-use mySociety::Locale;
+use Utils;
my ($soap, $method, $security);
@@ -92,14 +92,14 @@ sub string {
my ( $error, @valid_locations, $latitude, $longitude );
foreach (@$results) {
- ($latitude, $longitude) = Geo::Coordinates::CH1903::to_latlon($_->{easting}, $_->{northing});
- mySociety::Locale::in_gb_locale {
- push (@$error, {
- address => $_->{text},
- latitude => sprintf('%0.6f', $latitude),
- longitude => sprintf('%0.6f', $longitude)
- });
- };
+ ($latitude, $longitude) =
+ map { Utils::truncate_coordinate($_) }
+ Geo::Coordinates::CH1903::to_latlon($_->{easting}, $_->{northing});
+ push (@$error, {
+ address => $_->{text},
+ latitude => $latitude,
+ longitude => $longitude
+ });
push (@valid_locations, $_);
last if lc($_->{text}) eq lc($s);
}