GeoCoding返回ZERO_RESULTS

时间:2019-08-23 12:20:34

标签: google-api reverse-geocoding

以下是我的查询:

https://maps.googleapis.com/maps/api/geocode/json?latlng=53.477752,-2.266695&result_type=street_address&key=*****

,它返回空结果:

{
   "plus_code": {
      "compound_code": "FPHM+48 Salford, UK",
      "global_code": "9C5VFPHM+48"
   },
   "results": [],
   "status": "ZERO_RESULTS"
}

我已经在https://www.latlong.net上测试了坐标为53.477752,-2.266695的地名“曼彻斯特”,并且网站显示了正确的国王街。为什么GoogleAPI返回ZERO_RESULTS?这个问题在Google中仍然是错误吗?还是我需要添加其他参数?

1 个答案:

答案 0 :(得分:0)

测试坐标(53.477752,-2.266695)后,我得到了一些结果。但是,似乎地址结果中没有一个包含result_type街道地址”。这就是为什么由于在查询中添加了result_type=street_address过滤器而导致零结果作为响应的原因。

请参阅Geocoder tool以查看实际结果。这是示例请求:https://maps.googleapis.com/maps/api/geocode/json?&latlng=53.477752,-2.266695&key=YOUR_API_KEY