aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Geocode/Google.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-05-23 17:39:00 +0100
committerStruan Donald <struan@exo.org.uk>2012-05-23 17:39:00 +0100
commit7cb6bb21f713bc07a06ece5f4109cd6bd5a7f0b0 (patch)
treeeaff3aa286d8e1910b33c204c79b6837e109a216 /perllib/FixMyStreet/Geocode/Google.pm
parent9019fda388f9232181387e8cce1d28e8b89de1ee (diff)
parent3b0e39a4c89e4c184f30c6131936dc63845d6a1f (diff)
Merge remote-tracking branch 'origin/master' into phonegap
Diffstat (limited to 'perllib/FixMyStreet/Geocode/Google.pm')
-rw-r--r--perllib/FixMyStreet/Geocode/Google.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Geocode/Google.pm b/perllib/FixMyStreet/Geocode/Google.pm
index 83b36dbcd..1ab347066 100644
--- a/perllib/FixMyStreet/Geocode/Google.pm
+++ b/perllib/FixMyStreet/Geocode/Google.pm
@@ -75,7 +75,14 @@ sub string {
my $address = $_->{address};
next unless $c->cobrand->geocoded_string_check( $address );
( $longitude, $latitude ) = @{ $_->{Point}->{coordinates} };
- push (@$error, { address => $address, latitude => $latitude, longitude => $longitude });
+ # These co-ordinates are output as query parameters in a URL, make sure they have a "."
+ mySociety::Locale::in_gb_locale {
+ push (@$error, {
+ address => $address,
+ latitude => sprintf('%0.6f', $latitude),
+ longitude => sprintf('%0.6f', $longitude)
+ });
+ };
push (@valid_locations, $_);
}
return { latitude => $latitude, longitude => $longitude } if scalar @valid_locations == 1;