From 65dfee56a9f9ff7f730bd40556dc2fa7f9b27539 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Tue, 20 Mar 2018 15:40:23 +0000 Subject: Make sure OSM geocoder is bounded, includes icon. --- perllib/FixMyStreet/Geocode/OSM.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'perllib/FixMyStreet/Geocode/OSM.pm') 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 }); -- cgit v1.2.3 From 8b932d2b0ef36579a3b2b5fb9702f03d9e73559a Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Tue, 20 Mar 2018 14:33:29 +0000 Subject: [FixaMinGata] Update geocoding. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Removes the FixaMinGata Geocode module - Surround bounds coordinates with quotes - Return a different bounding box for Öckerö and other places - Specifies specific GPS coordinates for certain OpenStreetMap relations - Removes a comment --- perllib/FixMyStreet/Geocode/OSM.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'perllib/FixMyStreet/Geocode/OSM.pm') diff --git a/perllib/FixMyStreet/Geocode/OSM.pm b/perllib/FixMyStreet/Geocode/OSM.pm index 4878df997..d237f453b 100644 --- a/perllib/FixMyStreet/Geocode/OSM.pm +++ b/perllib/FixMyStreet/Geocode/OSM.pm @@ -52,6 +52,7 @@ sub string { my ( $error, @valid_locations, $latitude, $longitude ); foreach (@$js) { + $c->cobrand->call_hook(geocoder_munge_results => $_); ( $latitude, $longitude ) = map { Utils::truncate_coordinate($_) } ( $_->{lat}, $_->{lon} ); -- cgit v1.2.3