google-maps - Google Maps Directions API 零结果错误
问题描述
我们想使用 Google Maps Directions API 在两点之间绘制路线。
要求:
https://maps.googleapis.com/maps/api/directions/json?origin=39.76700140,30.50334660&destination=39.49402464,31.84024373
回复:
{
"geocoded_waypoints" : [ {}, {} ],
"routes" : [],
"status" : "ZERO_RESULTS"
}
它返回 ZERO_RESULTS 状态。但是,这两个点可以进行地理编码,它们是实际有效的点。
有谁知道为什么路线虽然可以进行地理编码却无法绘制?
在此先感谢,马克
解决方案
我找到了原因。谷歌路线到靠近道路至少 5 公里的点。
那一点在农村地区,不靠近任何至少 5 公里的道路。因此,它给出了名为 ZERO_RESULTS 的错误。
谢谢,
标记
推荐阅读
- angular - 如何获得当前值:Angular
- flutter - 使用 cached_network_image 在移动存储中长时间缓存网络图像
- mysql - 日期范围内不存在的 Sql 替代方案
- r - 如何从 R 中的数据框中删除重复和相同的行?
- azure - Azure 媒体播放器多实例卷问题
- node.js - 无法通过 Prom-client 将应用程序数据获取到 prometheus
- javascript - indexedDB 函数返回跨模块的导入/导出
- docker - Nginx 启动失败,没有日志
- javascript - React Native - OnSetGlobal - 承诺?或其他解决方案?
- ios - 如何在 SwiftUI 中为应用程序制作自定义导航栏?