简体   繁体   English

Google Distance Api以特定的纬度经度返回零

[英]Google Distance Api returns Zero with specific Latitude Longitude

I am providing Origin Latitude/Longitude and Destination Latitude/Longitude to Google API. 我向Google API提供了原始纬度/经度和目标纬度/经度。

But in response it returns Zero. 但作为回应,它返回零。

Provided Coordinates: 提供坐标:

Origin       = 70.7417,-22.6583 

Destination  = 48.8602,2.34107 

Output Result: 输出结果:

This XML file does not appear to have any style information associated with it. 
The document tree is shown below.

    <DirectionsResponse>
    <status>ZERO_RESULTS</status>
    </DirectionsResponse>

Source Link: 来源链接:

https://maps.google.com/maps/api/directions/xml?language=fr&origin=70.7417,-22.6583&destination=48.8602,2.34107&sensor=false https://maps.google.com/maps/api/directions/xml?language=fr&origin=70.7417,-22.6583&destination=48.8602,2.34107&sensor=false

Can anyone tell me where I am making a mistake? 谁能告诉我我在哪里犯了错误?

Originally the points are form Danemark | 最初的积分是Danemark | Constable Pynt | Constable Pynt | 3985 | 3985 | Gronland TO France Paris 75001 Ile-de-France Gronland TO France Paris 75001 Ile-de-France

"ZERO_RESULTS" indicates that the geocode was successful but returned no results. “ZERO_RESULTS”表示地理编码成功但未返回任何结果。 This may occur if the geocode was passed a non-existent address or a latlng in a remote location. 如果地理编码在远程位置传递了不存在的地址或latlng,则可能会发生这种情况。

please try to check if you coordinates are valid. 请尝试检查您的坐标是否有效。

My guess would be that Google Maps tries to find a driving route between the two points. 我的猜测是谷歌地图试图找到两点之间的驾驶路线。 Since the locations you provided are in Greenland and France, with no direct connection, Google can't find directions, hence the response ZERO_RESULTS . 由于您提供的地点位于格陵兰和法国,没有直接连接,Google无法找到路线,因此响应为ZERO_RESULTS

Quote from the documentation : 文档中引用:

ZERO_RESULTS indicates no route could be found between the origin and destination.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过Google API获取经纬度的行驶距离 - get driving distance from latitude and longitude via google api 用于查找使用纬度和经度之间的距离的Sql返回错误的距离 - Sql for finding the distance between using latitude and longitude returns wrong distance 使用 PHP 和谷歌地图 Api 计算出 2 个纬度和经度之间的距离 - Using PHP and google Maps Api to work out distance between 2 latitude and longitude ZERO_RESULTS 在尝试使用谷歌地图 API 获取纬度和经度时显示 - ZERO_RESULTS shows when trying to get latitude and longitude using google map API 解析谷歌地图API的纬度和经度 - Parsing Google Maps API for Latitude and Longitude 来自Google Maps Api JSON的经度和纬度? - Longitude and Latitude from Google Maps Api JSON? 使用Google API从地点获取纬度,经度并获取相同的特定国家/地区(使用PHP) - Using Google API get Latitude, Longitude from places and get specific country for the same(using PHP) 基本 API 使用 JavaScript 或 PHP 从地址返回经度和纬度 - Basic API that returns longitude and latitude from an address using JavaScript or PHP PHP如何使用Google API获取完整的经度和纬度 - PHP How to get the full longitude and the latitude using google API 使用Google API获取位置的纬度和经度并传递变量 - Getting latitude and longitude of a location using Google API and passing of variables
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM