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

Use Places API for GoogleProvider?

Open johan-- opened this issue 7 years ago • 5 comments

The GoogleProvider is not returning any results in our application (with a proper Google API key), nor is the demo application working when Google is selected.

Update: we are seeing 403s in the Google Cloud Platform, awaiting a response from their support.

Which API should be used: GeoCoding or Places? The latter is used for auto-completion, yet it seems as if the GoogleProvider is using the geoCoding API (since that is where the 403s are).

screenshot-console cloud google com-2018 07 16-13-11-28

johan-- avatar Jul 16 '18 09:07 johan--

The google provider is indeed using the GeoCoding api. Would it be better to use Places? Or do we need a hybrid approach? Places for the suggestions, and the GeoCoding for the selection?

smeijer avatar Apr 13 '20 17:04 smeijer

Hello leafleat-geoserach team Could you please implement places api for google provider? As parameter or as separate provider - both options are good. Places api is better for search, because it can find more locations. Places and geocoding differences: https://cloud.google.com/blog/products/maps-platform/address-geocoding-in-google-maps-apis

minzdrav avatar May 29 '23 14:05 minzdrav

Hello leafleat-geoserach team Could you please implement places api for google provider? As parameter or as separate provider - both options are good. Places api is better for search, because it can find more locations. Places and geocoding differences: https://cloud.google.com/blog/products/maps-platform/address-geocoding-in-google-maps-apis

you are right. @smeijer please use google "places" autocomplete for autocomplete then grab place_id and get the data from google "geocoder" api

itaymining avatar Nov 07 '23 15:11 itaymining

I'd be happy to merge a pull request adding such a provider.

smeijer avatar Nov 07 '23 18:11 smeijer