Autocomplete in SearchBox does not work even in official example

北战南征 提交于 2019-11-26 14:52:49

问题


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)



来源:https://stackoverflow.com/questions/49049750/autocomplete-in-searchbox-does-not-work-even-in-official-example

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!