From ef421c31febe5219042468e3ec33654cf1e11556 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Tue, 9 Aug 2011 10:42:15 +0100 Subject: Store lat/lon from multiple results and use that to prevent infinite loop on e.g. 'Clapham'. --- perllib/FixMyStreet/Geocode/Bing.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'perllib/FixMyStreet/Geocode/Bing.pm') diff --git a/perllib/FixMyStreet/Geocode/Bing.pm b/perllib/FixMyStreet/Geocode/Bing.pm index cfeffc856..90d7f98bd 100644 --- a/perllib/FixMyStreet/Geocode/Bing.pm +++ b/perllib/FixMyStreet/Geocode/Bing.pm @@ -57,7 +57,7 @@ sub string { my $address = $_->{name}; next unless $_->{address}->{countryRegion} eq 'United Kingdom'; # FIXME This is UK only ( $latitude, $longitude ) = @{ $_->{point}->{coordinates} }; - push (@$error, $address); + push (@$error, { address => $address, latitude => $latitude, longitude => $longitude }); push (@valid_locations, $_); } return { latitude => $latitude, longitude => $longitude } if scalar @valid_locations == 1; -- cgit v1.2.3