How can I get multiple results from GoogleMaps when geocoding?
Closed this issue · 3 comments
cinilak commented
Apologies if this is a silly question, but I wasn't able to get multiple results which I would get when using Google geocode API nativelly (on it's own).
toin0u commented
Hi @cinilak :) There is no silly question !
The Geocoder ~2.x uses a ResultFactory. The DefaultResultFactory takes into account only the first result. If you need mutilple results you need to use the setter:
// ...
Geocoder::setResultFactory(new \Geocoder\Result\MultipleResultFactory);
// ...
Hope this will help you :) Feel free to open/comment this ticket if you need more assistance !
cinilak commented
Lovely, thank you so much!
toin0u commented
You're welcome :)