aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Geocode/Bexley.pm
diff options
context:
space:
mode:
authorZarino Zappia <mail@zarino.co.uk>2020-02-25 14:59:49 +0000
committerMatthew Somerville <matthew@mysociety.org>2020-02-26 13:52:14 +0000
commita8de040b29e18a9bf916e65a12b293b708b9f5cd (patch)
tree5caefadab8b17c5f29dda5bffbc95e8830638414 /perllib/FixMyStreet/Geocode/Bexley.pm
parenta6b58401b3bef860713f96c1ba5c576bd94e0b10 (diff)
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.
Diffstat (limited to 'perllib/FixMyStreet/Geocode/Bexley.pm')
-rw-r--r--perllib/FixMyStreet/Geocode/Bexley.pm2
1 files changed, 2 insertions, 0 deletions
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}};