改为v3版本返回count
This commit is contained in:
+4
-4
@@ -146,11 +146,11 @@ class GaoDeUtils {
|
||||
while (result.size() < count) {
|
||||
params.page = "${page}".toString()
|
||||
page++
|
||||
params.key = this.getGaodeKey("v5/place/around")
|
||||
JSONObject json = HttpRequestUtil.getJsonContent("http://restapi.amap.com/v5/place/around", params);
|
||||
params.key = this.getGaodeKey("v3/place/around")
|
||||
JSONObject json = HttpRequestUtil.getJsonContent("http://restapi.amap.com/v3/place/around", params);
|
||||
if (json == null) {
|
||||
params.key = this.getGaodeKey("v5/place/around")
|
||||
json = HttpRequestUtil.getJsonContent("http://restapi.amap.com/v5/place/around", params);
|
||||
params.key = this.getGaodeKey("v3/place/around")
|
||||
json = HttpRequestUtil.getJsonContent("http://restapi.amap.com/v3/place/around", params);
|
||||
}
|
||||
if (json && json.info && json.info == "OK") {
|
||||
count = json.getString("count").toInteger()
|
||||
|
||||
Reference in New Issue
Block a user