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