骑行路线规划
GET
/directionlite/v1/riding
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'https://api.map.baidu.com/directionlite/v1/riding?origin=40.01116,116.339303&destination=39.936404,116.452562&ak=&sn='
响应示例响应示例
{
"status": 0,
"message": "string",
"result": "string",
"origin": {
"lng": 0,
"lat": 0
},
"destination": {
"lng": 0,
"lat": 0
},
"routes": {
"distance": 0,
"duration": 0,
"steps": {
"direction": "string",
"turn_type": "string",
"distance": 0,
"duration": 0,
"name": "string",
"instruction": "string",
"start_location": {
"lng": 0,
"lat": 0
},
"end_location": {
"lng": 0,
"lat": 0
},
"path": 0
}
}
}
请求参数
Query 参数
origin
number
必需
示例值:
40.01116,116.339303
destination
number
必需
示例值:
39.936404,116.452562
origin_uid
string
可选
destination_uid
string
可选
riding_type
string
可选
coord_type
string
可选
ret_coordtype
string
可选
timestamp
string
可选
ak
string
必需
默认值:
{{ak}}
sn
string
可选
默认值:
{{sn}}
返回响应
修改于 2022-08-22 02:01:09