civictechdc / ancfinder

A website about DC's Advisory Neighborhood Commission system.
http://ancfinder.org/
Creative Commons Zero v1.0 Universal
43 stars 36 forks source link

Incomplete address searches produce unreliable results #183

Open ilyagerner opened 5 years ago

ilyagerner commented 5 years ago

For example, when a user types in "200 C Street" the site responds with "You live in ANC 6D, single member district SMD 6D02."

However, 200 C Street could refer to "200 C STREET SE" which is in 6B01, or "200 C STREET SW" which is indeed SMD 6D02.

Ideally, the ANCFinder would prompt the user with "Did you mean...? 200 C Street NW or 200 C Street SW". At minimum, it should fail if the address is ambiguous rather than making an assumption.

rbmy commented 5 years ago

@lemwerks do you know if there is a mapbox solution to this? @kelshew and I were talking about it today and thought mapbox may already have this functionality.

lemwerks commented 5 years ago

@rbmy + @ilyagerner YES!

GL Geocoder should work for you.

And I'd set the search to use only a bounding box (BBOX) parameter outlined here.

Additionally set autocomplete after four or five characters to display a few options of the address they could mean. Play around with both in the Geocoding Playground to get the right URL Request.