本文介绍了即使在官方示例中,SearchBox中的自动完成功能也不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天我注意到SearchBox中的自动完成功能并不适用于我的服务,当我查看谷歌的官方示例时,它甚至无法正常工作。





有谁知道发生了什么? >) 使用Google Maps API的先前版本可以帮助我。我使用v = 3.exp并将其更​​改为v = 3.0。 com / maps / api / js?v = 3.0& key = YOUR_KEY& libraries = places>< / script> $ b

请参阅:



问题跟踪器中的相关错误:
(来自xomena的评论)


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? >)

解决方案

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)

这篇关于即使在官方示例中,SearchBox中的自动完成功能也不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 11:18