问题描述
今天我注意到 SearchBox 中的自动完成功能不在我的服务中,当我查看来自 Google 的官方示例时,它甚至在那里也不起作用.
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? >)
更新
此错误已在问题跟踪器 https://issuetracker.google.com/issues/74048143.它于 2018 年 3 月 2 日在 3.32 版本中被标记为已修复.
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.
推荐答案
使用以前版本的 Google Maps API 对我有用.我正在使用 v=3.exp 并将其更改为 v=3.0
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>代码>
参见:https://developers.google.com/maps/documentation/javascript/版本
问题跟踪器中的相关错误:https://issuetracker.google.com/issues/74048143一>(来自 xomena 的评论)
Related bug in the issue tracker: https://issuetracker.google.com/issues/74048143(from xomena's comment)
这篇关于即使在官方示例中,SearchBox 中的自动完成也不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!