diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-05-04 15:17:29 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-05-04 15:17:50 +0100 |
commit | 79c777f2a6e3cd49f227f0ba1feb8f7c5b97fd10 (patch) | |
tree | 34adea9abd9814c69cf9604a7d95dc5487067dcf /perllib/FixMyStreet | |
parent | db156a1d0311f8fe60736ffe307d324eee0b8480 (diff) |
Fix bug wherein links on multiple result pages in other locales would not work.
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/Geocode/Bing.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Geocode/Bing.pm b/perllib/FixMyStreet/Geocode/Bing.pm index 4ba00dbfe..a24f7c102 100644 --- a/perllib/FixMyStreet/Geocode/Bing.pm +++ b/perllib/FixMyStreet/Geocode/Bing.pm @@ -69,7 +69,14 @@ sub string { ); ( $latitude, $longitude ) = @{ $_->{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, $_); } |