公交路线规划
GET
/directionlite/v1/transit
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'https://api.map.baidu.com/directionlite/v1/transit?origin=40.056878,116.30815&destination=39.909263,116.39269&ak=&sn='
响应示例响应示例
{
"status": 0,
"message": "string",
"result": "string",
"origin": {
"lng": 0,
"lat": 0
},
"destination": {
"lng": "string",
"lat": "string"
},
"taxi": {
"detail": {
"desc": "string",
"km_price": 0,
"start_price": 0,
"total_price": 0
},
"distance": 0,
"duration": 0,
"remark": "string"
},
"routes": {
"distance": 0,
"duration": 0,
"traffic_condition": "string",
"price": 0,
"line_price": {
"line_type": "string",
"line_price": 0
},
"steps": {
"distance": 0,
"duration": 0,
"instructions": "string",
"type": "string",
"path": 0,
"start_location": {
"lng": 0,
"lat": 0
},
"end_location": {
"lng": 0,
"lat": 0
},
"vehicle": {
"name": "string",
"direction_text": "string",
"start_name": "string",
"end_name": "string",
"start_time": 0,
"end_time": 0,
"stop_num": 0,
"total_price": 0,
"type": "string",
"zone_price": 0
}
}
}
}
请求参数
Query 参数
origin
number
必需
示例值:
40.056878,116.30815
destination
number
必需
示例值:
39.909263,116.39269
origin_uid
string
可选
destination_uid
string
可选
coord_type
string
可选
ret_coordtype
string
可选
timestamp
string
可选
ak
string
必需
默认值:
{{ak}}
sn
string
可选
默认值:
{{sn}}
返回响应
修改于 2022-08-22 02:01:15