我正在使用反向地理编码来获取位置名称。我在模拟器上调试并运行以下查询:
http://maps.googleapis.com/maps/geo?json&ll=-42.307546,-101.048116&sensor=false
它会产生以下结果:
{
"name": "-42.307546,-101.048116",
"Status": {
"code": 602,
"request": "geocode"
}
}
它不会导致我获取位置名称。我怎样才能找到位置名称?请帮忙。 非常感谢。
答案 0 :(得分: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.
问题在于纬度和经度的值。
答案 1 :(得分:0)
那是因为你使用了无效的坐标。试试这个。 http://maps.googleapis.com/maps/geo?json&ll=35.670392,139.775844&sensor=false