服务文档
https://api.map.baidu.com/batch //POST请求
{
"reqs":[
{
"method":"get",
"url":"/geocoding/v3/?address=重庆市沙坪坝区学城大道62号&ak=你的ak&output=json"
},
{
"method":"get",
"url":"/reverse_geocoding/v3/?location=35.658651,119.745415&output=json&entensions_poi=0&ak=你的ak"
}
]
}
"status":0,
"batch_result":[
{
"status":0,
"result":{
"location":{
"lng":106.3795289775268,
"lat":29.609004995890615
},
"precise":1,
"confidence":100,
"comprehension":100,
"level":""
}
},
{
"status":0,
"result":{
"location":{
"lng":119.74541499999992,
"lat":35.65865089820304
},
"formatted_address":"山东省青岛市黄岛区港兴大道",
"business":"",
"addressComponent":{
"country":"中国",
"country_code":0,
"country_code_iso":"CHN",
"country_code_iso2":"CN",
"province":"山东省",
"city":"青岛市",
"city_level":2,
"district":"黄岛区",
"town":"",
"adcode":"370211",
"street":"港兴大道",
"street_number":"",
"direction":"",
"distance":""
},
"pois":[
"roads":[
"poiRegions":[
"sematic_description":"",
"cityCode":236
}
}
]
}
返回码 | 英文描述 | 定义 | 常见原因 |
---|---|---|---|
0 | ok | 正常 | 服务请求正常召回 |
-1 | 用户请求格式错误 | json请求正文不符合规定的格式 | |
-2 | 返回数据格式非json错误 | json里的请求子串使用了callback参数 | |
-3 | 服务不支持 | 访问了非正逆编码服务 |
修改于 2022-08-05 08:15:24