接口描述
请求路径:https://mapapi-places.apigw-gz.didiyunapi.com/api/v1/coordconv
请求方法:GET
输入参数
参数名称 | 必选 | 默认值 | 描述 |
---|---|---|---|
locations | 是 | 无 | 坐标点串:lng,lat|lng,lat|…,经纬度小数点后不超过6位,最多50个坐标点 |
coordsys | 否 | 无 | 输入点坐标系:0(GPS坐标),1(百度经纬度坐标) |
输出参数
参数名称 | 类型 | 描述 |
---|---|---|
status | int | 状态码 |
info | string | 状态说明 |
result | Result | 请求返回数据 |
Result:
参数名称 | 类型 | 描述 |
---|---|---|
locations | array<Locations> | 位置json数组 |
Locations:
参数名称 | 类型 | 描述 |
---|---|---|
location | array<Location> | 位置json数组 |
location | array<Location> | 位置json数组 |
Location:
参数名称 | 类型 | 描述 |
---|---|---|
lng | float | 经度 |
lat | float | 纬度 |
错误码
示例
请求:
curl -X GET \
'https://mapapi-places.apigw-gz.didiyunapi.com/api/v1/geocode/coordconv?locations=118.645289,40.878886'\
--header 'Authorization: AppCode XXX'
输出:
{
"status": 0,
"info": "OK",
"result": {
"locations": [
{
"lng": 12.34,
"lat": 45.67
}
]
}
}