aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Geocode/OSM.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-03-20 15:40:23 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-04-03 09:34:46 +0100
commit65dfee56a9f9ff7f730bd40556dc2fa7f9b27539 (patch)
tree4188605ecada554c17831fcf7fc47fd8addf4502 /perllib/FixMyStreet/Geocode/OSM.pm
parent307cc20b6ed92a983ba859ec5173066d68ec3aa9 (diff)
Make sure OSM geocoder is bounded, includes icon.
Diffstat (limited to 'perllib/FixMyStreet/Geocode/OSM.pm')
-rw-r--r--perllib/FixMyStreet/Geocode/OSM.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Geocode/OSM.pm b/perllib/FixMyStreet/Geocode/OSM.pm
index 020be3c2a..4878df997 100644
--- a/perllib/FixMyStreet/Geocode/OSM.pm
+++ b/perllib/FixMyStreet/Geocode/OSM.pm
@@ -39,6 +39,8 @@ sub string {
);
$query_params{viewbox} = $params->{bounds}[1] . ',' . $params->{bounds}[2] . ',' . $params->{bounds}[3] . ',' . $params->{bounds}[0]
if $params->{bounds};
+ $query_params{bounded} = 1
+ if $params->{bounds};
$query_params{countrycodes} = $params->{country}
if $params->{country};
$url .= join('&', map { "$_=$query_params{$_}" } sort keys %query_params);
@@ -55,6 +57,7 @@ sub string {
( $_->{lat}, $_->{lon} );
push (@$error, {
address => $_->{display_name},
+ icon => $_->{icon},
latitude => $latitude,
longitude => $longitude
});