diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-03-29 12:35:47 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-03-29 12:35:47 +0100 |
commit | 3b127fdb044cb43cf519be593159cde2931b71fd (patch) | |
tree | 29fa3e361f23222535e3b6640609087b8ae53900 | |
parent | f8f6c93521aa7fa710719be975ff7b91b190e3a2 (diff) |
Also treat as same if just same locality and postalcode.
-rw-r--r-- | perllib/FixMyStreet/Geocode/Bing.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Geocode/Bing.pm b/perllib/FixMyStreet/Geocode/Bing.pm index 83fde0c2c..99197a5f9 100644 --- a/perllib/FixMyStreet/Geocode/Bing.pm +++ b/perllib/FixMyStreet/Geocode/Bing.pm @@ -64,7 +64,9 @@ sub string { next if @valid_locations && $valid_locations[-1]{address}{postalCode} eq $_->{address}{postalCode} && ( $valid_locations[-1]{address}{locality} eq $_->{address}{adminDistrict2} - || $valid_locations[-1]{address}{adminDistrict2} eq $_->{address}{locality} ); + || $valid_locations[-1]{address}{adminDistrict2} eq $_->{address}{locality} + || $valid_locations[-1]{address}{locality} eq $_->{address}{locality} + ); ( $latitude, $longitude ) = @{ $_->{point}->{coordinates} }; push (@$error, { address => $address, latitude => $latitude, longitude => $longitude }); |