leaflet-geosearch icon indicating copy to clipboard operation
leaflet-geosearch copied to clipboard

Google Provider Autocomplete Results

Open Hossam-Ali opened this issue 2 years ago • 1 comments

Hello, Thank you for the amazing library.

I have a question regarding Google Provider. The autocomplete is not working as expected as I have to write the exact address and returns very limited results.

I can see, you are using https://maps.googleapis.com/maps/api/js/GeocodeService.Search for the autocomplete results. While on Google API they use https://maps.googleapis.com/maps/api/place/js/AutocompletionService.GetPredictions

My code Screenshot 2023-10-10 at 6 36 55 PM

Google API Screenshot 2023-10-10 at 6 38 15 PM

Is there anyway to improve that? Thank you!

Hossam-Ali avatar Oct 10 '23 16:10 Hossam-Ali

Hey @Hossam-Ali could you provide me a sample code of how you configured the Google Provider, since it seems to be working for you (at least for the exact adresses)? I'm not able to make it work, no matter the address I search, no results appear on the screen. However if I use the OSM provider it works (the results are kind of obsolete but it works). I already opened an issue here but no comments yet.

ffkarine avatar Mar 27 '24 14:03 ffkarine