高德实时路线规划API接口免费调用
2023-04-10
一、接口名称:
二、接口介绍:
基于全面的路网信息,结合实时路况,在多端为用户提供准确的路线规划能力,支持公交、驾车、步行和骑行路径规划。路线规划是导航的前提,根据目的地、出发地以及路径策略设置,为用户量身设计出行方案。同时可结合实时交通,帮助用户绕开拥堵路段,提供更贴心、更人性化的出行体验。
三、API接口文档
1、请求地址
url:https://api.shumaidata.com/v10/route-plan/drive
请求方式method:get/post
参数:
2、签名算法说明:
服务商分配的appid、当前时间毫秒数timestamp、商户分配的app_security、三者通过&符号拼接成字符串进行md5加密得到。
如:appid=xyzxyzxyz,timestamp=1555378976238,app_security=efcefcefcefcefc;
拼接后的字符串格式:str=appid的值&timestamp的值&app_security的值;
拼接后的字符串:str=xyzxyzxyz&1555378976238&efcefcefcefcefc;
加密后得到sign=md5(str)=4e7e1974b79f3656aeaf03f1158f5d5d;
3、正确返回:
{
"msg":"成功",
"success":true,
"code":200,
"data":{
"orderNo":"113hlwp1msz36nt6s5",
"ret_code":"0",
"remark":"查询成功!",
"allNum":"1",
"depart":"116.45925,39.910031",
"arrival":"116.587922,40.081577",
"distance":null,
"taxiCost":"76",
"driveRoutes":[
{
"traffic_signals":"2",//红绿灯个数
"distance":"25437",//行驶距离
"restricted":"0",//限行结果0代表限行已规避或未限行,即该路线没有限行路段1代表限行无法规避,即该线路有限行路段
"estimate":"1800",//行驶时间
"toll_distance":"747",//收费路段距离
"strategy":"速度最快",//导航策略
"steps":[
{
"step_instruction":"向西南行驶124米左转进入左侧道路",//行驶指示
"step_distance":"124",//此路段距离单位:米
"step_detail":[
{
"step_detail_distance":"124",
"step_detail_status":"畅通",
"step_detail_coordinate":"116.459258,39.909836;116.458908,39.909826;116.458822,39.909789;116.4588,39.909757;116.45879,39.90922;
116.458827,39.909135;116.458935,39.909065"
}
],
"step_road_name":"",//道路名称
"step_tolls":"0",//此段收费单位:元
"step_toll_road_name":"",//主要收费道路
"step_coordinate":"116.459258,39.909836;116.458908,39.909826;116.458822,39.909789;116.4588,39.909757;116.45879,39.90922;
116.458827,39.909135;116.458935,39.909065",//此路段坐标点串
"step_direction":"西南",//方向
"step_toll_distance":"0",//收费路段距离单位:米
"step_aux_action":"进入左侧道路",//导航辅助动作
"step_action":"左转"//导航主要动作
}
],
"tolls":"5"//此导航方案道路收费单位:元
}
]
}
}
4、错误返回:
{
"msg":"参数错误",
"success":false,
"code":400,
"data":{}
}
5、返回字段说明:
6、code错误码说明
相关资讯
2021-08-01
2025-03-25
2021-07-09
2022-05-27
2022-12-09
2022-05-06
2021-07-02
2021-06-16
2024-08-09
2020-11-24