aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/Geocode/OSM.pm3
-rw-r--r--templates/web/base/around/_error_multiple.html11
2 files changed, 11 insertions, 3 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
});
diff --git a/templates/web/base/around/_error_multiple.html b/templates/web/base/around/_error_multiple.html
index 751d81173..6a43eac32 100644
--- a/templates/web/base/around/_error_multiple.html
+++ b/templates/web/base/around/_error_multiple.html
@@ -5,9 +5,14 @@
[% IF possible_location_matches %]
<p>[% loc('We found more than one match for that location.') %]</p>
<ul class="pc_alternatives">
- [% FOREACH match IN possible_location_matches %]
- <li><a href="/around?latitude=[% match.latitude | uri %];longitude=[% match.longitude | uri %][% IF c.req.params.category %];category=[% c.req.params.category | uri %][% END %]">[% match.address | html %]</a></li>
- [% END %]
+ [% FOREACH match IN possible_location_matches %]
+ <li>
+ [% IF match.icon %]
+ <img src="[% match.icon %]" alt="">
+ [% END %]
+ <a href="/around?latitude=[% match.latitude | uri %];longitude=[% match.longitude | uri %][% IF c.req.params.category %];category=[% c.req.params.category | uri %][% END %]">[% match.address | html %]</a>
+ </li>
+ [% END %]
</ul>
<p>[% loc('We show up to ten matches, please try a different search if yours is not here.') %]</p>
[% END %]