为什么距离矩阵api总是返回状态“ZERO_RESULTS”? [英] Why distance matrix api always returning the status "ZERO_RESULTS"?
问题描述
我使用距离矩阵api来计算一个源和多个目标之间的距离。来源纬度/经度和目的地纬度/经度是完美的。此外,路线在这些点之间的谷歌地图中存在。但是API总是返回状态ZERO_RESULTS。这个问题的原因是什么以及如何解决。
距离矩阵api的响应如下:
行:[
{
元素:[
{
status:ZERO_RESULTS
},
{
status:ZERO_RESULTS
},
。
。
。
。
$ b):}
]}],status:OK}
根据Google描述距离矩阵api
可能在代码中存在错误实现
试试这种方式:)
I am using the distance matrix api to calculate the distance between one source and multiple destinations. The source latitude / longitude and destination latitudes / longitudes are perfect. Also the route is existing in Google maps between those points. But the api is always returning the status "ZERO_RESULTS". What is the reason for this issue and how it could be solved.
The response from distance matrix api is as follows :
"rows" : [
{
"elements" : [
{
"status" : "ZERO_RESULTS"
},
{
"status" : "ZERO_RESULTS"
},
.
.
.
.
): }
] } ], "status" : "OK" }
As per Google Description distance matrix api
may be there's something wrong implementation in your code try this way :)
这篇关于为什么距离矩阵api总是返回状态“ZERO_RESULTS”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!