diff options
author | Zarino Zappia <mail@zarino.co.uk> | 2020-02-25 14:59:49 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-02-26 13:52:14 +0000 |
commit | a8de040b29e18a9bf916e65a12b293b708b9f5cd (patch) | |
tree | 5caefadab8b17c5f29dda5bffbc95e8830638414 /perllib/FixMyStreet/Geocode/Bing.pm | |
parent | a6b58401b3bef860713f96c1ba5c576bd94e0b10 (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/Bing.pm')
-rw-r--r-- | perllib/FixMyStreet/Geocode/Bing.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Geocode/Bing.pm b/perllib/FixMyStreet/Geocode/Bing.pm index ee5e15f8c..1d39d911f 100644 --- a/perllib/FixMyStreet/Geocode/Bing.pm +++ b/perllib/FixMyStreet/Geocode/Bing.pm @@ -38,6 +38,7 @@ sub string { $url .= '&userLocation=' . $params->{centre} if $params->{centre}; $url .= '&c=' . $params->{bing_culture} if $params->{bing_culture}; + $c->stash->{geocoder_url} = $url; my $js = FixMyStreet::Geocode::cache('bing', $url, 'key=' . FixMyStreet->config('BING_MAPS_API_KEY')); if (!$js) { return { error => _('Sorry, we could not parse that location. Please try again.') }; |