-1

我正在使用反向地理编码来获取位置名称。我在模拟器上调试并运行以下查询:

http://maps.googleapis.com/maps/geo?json&ll=-42.307546,-101.048116&sensor=false

结果如下:

{
  "name": "-42.307546,-101.048116",
  "Status": {
    "code": 602,
    "request": "geocode"
  }
}

它不会为我获取位置名称。如何找到位置名称?请帮忙。非常感谢。

4

2 回答 2

1

状态:这包括请求的响应代码,这是一种简单的方法来确定执行请求时实际发生了什么。可能的响应代码如下:

200: Successful request (at least one placemark was returned).
400: Bad request (the server was unable to understand the request).
500: Server error (an unknown internal error occurred).
601: Missing query. This means the q parameter was not specified (or was an empty string).
602: Unknown address. This means that the request was performed but no placemarks were found.
603: Unavailable address. The given address could not be returned due to legal or contractual reasons.
610: An invalid Google Maps API key was specified.
620: Too many queries have been performed using the given API key.

问题是因为纬度和经度的值。

于 2012-10-29T11:24:46.600 回答
0

那是因为您使用了无效的坐标。试试这个。 http://maps.googleapis.com/maps/geo?json&ll=35.670392,139.775844&sensor=false

于 2012-10-29T11:19:08.553 回答