diff options
author | Struan Donald <struan@exo.org.uk> | 2011-10-18 16:01:54 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-10-18 16:01:54 +0100 |
commit | 393201cd83219c8a510af0eb6985b7fca1989148 (patch) | |
tree | ac8568d35ebe2ed080f1c3fe74f0353b1101d2ca /perllib/FixMyStreet/Geocode/Bing.pm | |
parent | f524d4cbebeece580fb21a66231f2ae3d164666c (diff) |
do not add town if it is already in the query
Diffstat (limited to 'perllib/FixMyStreet/Geocode/Bing.pm')
-rw-r--r-- | perllib/FixMyStreet/Geocode/Bing.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Geocode/Bing.pm b/perllib/FixMyStreet/Geocode/Bing.pm index 962f8fe15..856d7061e 100644 --- a/perllib/FixMyStreet/Geocode/Bing.pm +++ b/perllib/FixMyStreet/Geocode/Bing.pm @@ -22,7 +22,7 @@ use Digest::MD5 qw(md5_hex); # may be used to disambiguate the location in cobranded versions of the site. sub string { my ( $s, $c, $params ) = @_; - $s .= '+' . $params->{town} if $params->{town}; + $s .= '+' . $params->{town} if $params->{town} and $s !~ /$params->{town}/i; my $url = "http://dev.virtualearth.net/REST/v1/Locations?q=$s&c=en-GB"; # FIXME nb-NO for Norway $url .= '&mapView=' . $params->{bounds}[0] . ',' . $params->{bounds}[1] if $params->{bounds}; |