mysociety/planningalerts-app — pull request #98 by stevenday (2014-10-30 14:26:55+00:00)
Title: Limit server-side geocoding in the same way as javascript does

This is an attempt to match up the way the different geocoders work as best as
I can, because previously not using the autocomplete suggestions would still
allow you to use searches like "Hampshire" and get a rubbish location.

The main way to fix this is actually to set a higher MINIMUM_ACCURACY config
setting, as little as increasing it to 5 seems to work pretty well. However,
for good measure I also added a similar bounding box bias to the geocoder.

If this proves insufficient, I think we can also ask Geokit to check if a
result is actually within a bounding box, so we can have a harder limit that
way.

As part of this I fixed a bug in the search, where it checked Geokit's
'success' attribute, rather than calling .error, which OpenAustralia have
extended to actually use the MINIMUM_ACCURACY setting amongst other nice
things.

Closes #96