From a8de040b29e18a9bf916e65a12b293b708b9f5cd Mon Sep 17 00:00:00 2001 From: Zarino Zappia Date: Tue, 25 Feb 2020 14:59:49 +0000 Subject: Optional logging of unsuccessful location searches If a SQLite file exists at `../data/analytics.sqlite` with a table named `location_searches_with_no_results`, then a row will be created for each /around search that returns no results. Could come in useful for anybody running an instance and looking to better understand how well their geocoder is performing. --- perllib/FixMyStreet/Geocode/Bexley.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'perllib/FixMyStreet/Geocode/Bexley.pm') diff --git a/perllib/FixMyStreet/Geocode/Bexley.pm b/perllib/FixMyStreet/Geocode/Bexley.pm index a70a42cd1..8a1a886bb 100644 --- a/perllib/FixMyStreet/Geocode/Bexley.pm +++ b/perllib/FixMyStreet/Geocode/Bexley.pm @@ -23,6 +23,8 @@ sub string { my $js = query_layer($s); return $osm unless $js && @{$js->{features}}; + $c->stash->{geocoder_url} = $s; + my ( $error, @valid_locations, $latitude, $longitude, $address ); foreach (sort { $a->{properties}{ADDRESS} cmp $b->{properties}{ADDRESS} } @{$js->{features}}) { my @lines = @{$_->{geometry}{coordinates}}; -- cgit v1.2.3