Hi all,
I wanted to open this issue to solicit feedback on how we should deal with multiple-responses from a geocoding API. Many address based APIs will return a set of multiple addresses that all represent candidate locations, ordered by likelihood.
Right now we are simply tossing all the responses except for the first one. We stuff the $geom->data array with the raw response so downstream users can make use of it if they need to.
I would like to see if we can deal with this in a more elegant way.
Comments
Comment #1
phayes commentedMy proposal is as follows:
1. doing a bare-bones call against the geocoder API will return a MultiPoint feature with all the candidate points, with likelihood ordering preserved.
2. geocoder widget should provide an option on what to do, with the default being keeping the first candidate and tossing the rest.
Sadly this would be an API breaking change, so we would have to start a 2.x branch. :-(
Comment #2
zzolo commentedWhy not just add an argument to the geocoder call that would return all the results, and the implementer can decide on what to do from there?
Comment #3
simon georges commentedGoogle geocoder already has a "multiple" handling option (following zzolo's proposal, it seems), so this could be implemented for others as well, I suppose.
Comment #4
simon georges commentedRe-qualifying as feature request.
Comment #4.0
simon georges commentedadding more desc
Comment #5
pol