willdurand/Geocoder — pull request #223 by mrkrstphr (2013-04-17 03:23:53+00:00)
Title: Retrieving Multiple Results from Google

This is by no means a complete implementation as I have only handled GoogleMaps, although the other providers should still work fine.

I have a use case for retrieving multiple results from Google and displaying them to the user to pick the correct one. This library only returns the first result, though.

I have modified the code to return all results from GoogleMaps, returning an array if there is more than one or a Result if there is only one.

Maybe for backwards compatibility, this could be controlled with some kind of config toggle. This pull request isn't meant to be accepted straight out, but to illustrate what I desire to achieve and how it could be achieved. Thoughts? Ideas?