google-maps - getQueryPredictions Api 无法获取格式化地址的地址
问题描述
我AutocompeteSerive
用来从 Google getQueryPredictions
API 获取地址。
这是自动完成输入框的初始化:
this.autoComp = new google.maps.places.AutocompleteService({
componentRestrictions: { 'country': 'in' }
});
this.autoComp.getQueryPredictions({ input: value }, (results, status) => {
console.log(status);
if (status == google.maps.places.PlacesServiceStatus.OK) {}
})
步骤1:
用户输入 bangalore。
为 Google Api 选择以下谓词:
No. 15, Mysuru Road, Near, Temple, Pancha Mukhi Ganapati Mandir, Kengeri, Bengaluru, 卡纳塔克邦 560060, 印度
将此地址重新发送到相同的 api 以供用户确认:ZERO_RESULTS
有什么解决办法吗?
注意:尝试将相同的地址两次发送到下面的 api 它工作正常..;(
解决方案
推荐阅读
- wordpress - WordPress 安装在 Google Cloud Kubernetes 集群上的位置
- python - 在没有循环的情况下查找二维数组中匹配行的索引(一次)
- docker - Dockerfile 中的 apt 和 apt-get 返回错误
- neo4j - 在 Neo4j 中显示间接(二级)关系
- javascript - 使用 reactjs、axios 和 php 从数据库中获取更新的数据
- html - 如何使用引导程序制作图像比例/中心?
- reactjs - 使用来自 Socketio 的 addEventListener 反应 Hooks
- html - 在不同的地方悬停时显示 div
- python - 如何将 numpy.ndarray 转换为 _io.BytesIO
- c# - 仅在 .NET Core 中出现 Roslyn 错误:“ResolvePackageFileConflicts”任务意外失败