Autocomplete in SearchBox does not work even in of

2020-01-29 03:03发布

问题:

Today I've noticed that autocomplete in SearchBox does not on my service and when I was checking official example from Google it did not work even there.

https://developers.google.com/maps/documentation/javascript/examples/places-searchbox

Does anyone know what's happening? >)

UPDATE

This bug was handled in issue tracker https://issuetracker.google.com/issues/74048143. It was marked as Fixed in version 3.32 on March 2, 2018.

回答1:

Using the previous version of the Google Maps API worked for me. I was using v=3.exp and changed it to v=3.0

<script src="https://maps.googleapis.com/maps/api/js?v=3.0&key=YOUR_KEY&libraries=places"></script>

See : https://developers.google.com/maps/documentation/javascript/versions

Related bug in the issue tracker: https://issuetracker.google.com/issues/74048143 (from xomena's comment)