I'm having a difficult time to use Google Places API autocomplete with a API key. In my production site, we are using it without a key, works perfectly until traffic reach the request limit. After some research, found out I will get higher request limit using a API key. However, after I added the key (even no restrictions), the address field in my form is disabled and showing "Oops! Something went wrong.".
Here is Google API URL I am using https://maps.googleapis.com/maps/api/js?key=[my_api_key]&libraries=places&callback=initAutocomplete
I was thinking it must be something wrong with my code. Then I use Google's official autocomplete sample code with my API key and no further modification, same result. Using it without a key always work.
I confused. I don't believe the code is wrong. Anyone can give me a hint?
Found the problem. I enabled "Google Places API Web Service" in Google Developer. However, this is not enough. I have to enable "Google Maps JavaScript API" as well.
Thanks the reference to Google Maps API error: Google Maps API error: ApiNotActivatedMapError
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With