轻量级路线规划 | 百度地图api sdk-凯发k8官方旗舰厅

浏览器版本低!无法浏览完整内容,建议升级或更换浏览器。
驾车路线规划
下载开发文档
接口说明

根据起终点坐标规划驾车出行路线和耗时,支持:

1. 支持10个途经点

2. 支持设置偏好:常规路线、不走高速、躲避拥堵

3. 支持传入起点车头方向,辅助判断起点所在正逆向车道,辅助更准确算路

api服务地址

https://api.map.baidu.com/directionlite/v1/driving?origin=40.01116,116.339303&destination=39.936404,116.452562&ak=您的ak
//get请求

请求参数
字段名称字段含义字段类型必填备注
ak

开发者密钥,

string
origin起点double,double起点经纬度,格式为:纬度,经度;小数点后不超过6位,40.056878,116.30815
destination终点double,double终点经纬度,格式为:纬度,经度;小数点后不超过6位,40.056878,116.30815
origin_uid起点uid,poi 的 uid(在已知起点poi 的 uid 情况下,请尽量填写uid,将提升路线规划的准确性)string
destination_uid终点uid,poi 的 uid(在已知起点poi 的 uid 情况下,请尽量填写uid,将提升路线规划的准确性)string
plate_number车牌号string
waypoints途经点string支持10个以内的有序途径点。多个途径点坐标按顺序以英文竖线符号分隔,示例: 40.465,116.314|40.232,116.352|40.121,116.453
tactics路线偏好int

默认值:0。
可选值:
0:常规路线,即多数用户常走的一条经验路线,满足大多数场景需求,是较推荐的一个策略
1:不走高速
2:躲避拥堵
3:距离较短

gps_direction起点的定位方向 int64车头方向为与正北方向顺时针夹角,取值范围[0,359]。该参数用于辅助判断起点所在正逆向车道,提高算路准确率。 当speed>1.5米/秒且gps_direction存在时,采用该方向。gps_direction并不代表需填写从gps获取的方向,可以填入校正后的方向。请填写尽量准确的方向,其准确性很大程度决定了计算的精度。
radius起点的定位精度float配合gps_direction字段使用,取值范围[0,2000]
speed起点车辆的行驶速度float配合gps_direction字段使用,单位:米/秒 当speed>1.5米/秒且gps_direction存在时,采用gps_direction的方向
coord_type输入坐标类型string

默认bd09ll
允许的值为:
bd09ll:百度经纬度坐标
bd09mc:百度墨卡托坐标
gcj02:国测局加密坐标
wgs84:gps设备获取的坐标

ret_coordtype输出坐标类型string

返回值的坐标类型,默认为百度经纬度坐标:bd09ll
可选值:
bd09ll:百度经纬度坐标
gcj02:国测局加密坐标

sn

用户的权限签名,当ak设置为sn校验时,该参数必填sn计算方法

string
timestamp时间戳,与sn配合使用stringsn存在时必填
steps_info

是否下发step详情
0:下发step详情
1:不下发step详情

int
返回参数
字段名称字段含义备注
status状态码0:成功
1:服务内部错误
2:参数无效
7:无返回结果
message状态码对应的信息
result返回的结果
origin
lng起点经度
lat起点纬度
destination
lng终点经度
lat终点纬度
routes返回的方案集
distance方案距离,单位:米
duration线路耗时,单位:秒
toll路线的过路费预估,单位:元
traffic_condition路线的整体路况评价取值范围
0: 无路况
1: 畅通
2:缓行
3:拥堵
4:严重拥堵
restriction_info
status限行状态0:不限行
1:已规避限行的路线合法
2:无法规避限行的非法路线
steps路线分段
leg_index途径点序号途径点序号为从0开始的整数,用于标识step所属的途径点路段
如:若该step属于起点至第一个途径中的路段,则其leg_index为0
direction进入道路的角度枚举值,返回值在0-11之间的一个值,共12个枚举值,以30度递进,即每个值代表角度范围为30度;其中返回"0"代表345度到15度,以此类推,返回"11"代表315度到345度";分别代表的含义是:0-[345°-15°];1-[15°-45°];2-[45°-75°];3-[75°-105°];4-[105°-135°];5-[135°-165°];6-[165°-195°];7-[195°-225°];8-[225°-255°];9-[255°-285°];10-[285°-315°];11-[315°-345°]
注:角度为与正北方向顺时针夹角
turn机动转向点,包括基准八个方向、环岛、分歧等枚举值,返回0-16之间的一个值,共17个枚举值。分别代表的含义是:
0:无效
1:直行
2:右前方转弯
3:右转
4:右后方转弯
5:掉头
6:左后方转弯
7:左转
8:左前方转弯
9:左侧
10:右侧
11:分歧-左
12:分歧中央
13:分歧右
14:环岛
15:进渡口
16:出渡口
distance路段距离单位:米
duration路段耗时单位:秒
road_type(该字段后续将废弃,由road_types代替)分段的道路类型枚举值:返回0-9之间的值
0:高速路
1:城市高速路
2:国道
3:省道
4:县道
5:乡镇村道
6:其他道路
7:九级路
8:航线(轮渡)
9:行人道路
road_types路段途径的道路类型列表 若途经多个路段类别,将用英文逗号","分隔,如:
- 该路段依次途经国道和省道两种道路类型,则road_types:"2,3"
- 该路段仅途经高速,则
road_types:"0"
road_types取值范围:
0:高速路
1:城市高速路
2:国道
3:省道
4:县道
5:乡镇村道
6:其他道路
7:九级路
8:航线(轮渡)
9:行人道路
instruction路段描述
start_location
lng分段起点经度
lat分段起点纬度
end_location
lng分段终点经度
lat分段终点纬度
path分段坐标
traffic_condition分段路况详情
status
路况指数取值范围
0: 无路况
1: 畅通
2: 缓行
3: 拥堵
4: 严重拥堵
geo_cnt
从当前坐标点开始,path中路况相同的坐标点个数
示例代码
填写您的ak

输入ak可生成包含ip/sn校验方式的代码

<?php
// 此处填写你在控制台-应用管理-创建应用后获取的ak
$ak ='您的ak';
// 发起一个http get请求,并返回请求的结果
// $url字段为请求的地址
// $param字段为请求的参数
functionrequest_get($url ='', $param =array()){
if(empty($url)||empty($param)){
returnfalse;
}
$geturl = $url ."?".http_build_query($param);
$curl =curl_init();// 初始化curl
curl_setopt($curl,curlopt_ssl_verifypeer,false);// 跳过证书检查
curl_setopt($curl,curlopt_ssl_verifyhost,2);// 从证书中检查ssl加密算法是否存在
curl_setopt($curl,curlopt_url, $geturl);// 抓取指定网页
curl_setopt($curl,curlopt_timeout,1000);// 设置超时时间1秒
curl_setopt($curl,curlopt_returntransfer,1);// curl不直接输出到屏幕
curl_setopt($curl,curlopt_header,0);// 设置header
$data =curl_exec($curl);// 运行curl
if(!$data){
print("an error occured in function request_get(): ".curl_error($curl)."\n");
}
curl_close($curl);
return $data;
}
// 请求地址
$url ='https://api.map.baidu.com/directionlite/v1/driving';
// 构造请求参数
$param['origin']='40.01116,116.339303';
$param['destination']='39.936404,116.452562';
$param['ak']= $ak;
$res =request_get($url, $param);
// 将原始返回的结果打印出来
print("请求的原始返回结果为:\n");
print($res ."\n");
?>
{
"status":0,
"message":"ok",
"result":{
"origin":{
"lng":116.339303,
"lat":40.011160069003
},
"destination":{
"lng":116.452562,
"lat":39.93640407532
},
"routes":[
{
"route_md5":"7242503eaa561373b57b2006ea8eb5b2",
"distance":17585,
"duration":3357,
"traffic_condition":2,
"toll":0,
"restriction_info":{
"status":0
},
"steps":[
{
"leg_index":0,
"distance":104,
"duration":15,
"direction":3,
"turn":3,
"road_type":6,
"road_types":"6",
"instruction":"从起点向正东方向出发,行驶100米,右转进入明德路",
"path":"116.33964557069,40.01051873416;116.34000633018,40.010546434696;116.34087804585,40.010561355679",
"traffic_condition":[
{
"status":0,
"geo_cnt":2
}
],
"start_location":{
"lng":"116.33964557069",
"lat":"40.01051873416"
},
"end_location":{
"lng":"116.34087804585",
"lat":"40.010561355679"
}
},
{
"leg_index":0,
"distance":132,
"duration":21,
"direction":6,
"turn":7,
"road_type":6,
"road_types":"6",
"instruction":"沿明德路行驶130米,左转",
"path":"116.34087804585,40.010561355679;116.34092880011,40.009611310826;116.34091891875,40.009371397007",
"traffic_condition":[
{
"status":0,
"geo_cnt":2
}
],
"start_location":{
"lng":"116.34087804585",
"lat":"40.010561355679"
},
"end_location":{
"lng":"116.34091891875",
"lat":"40.009371397007"
}
},
{
"leg_index":0,
"distance":228,
"duration":42,
"direction":3,
"turn":3,
"road_type":6,
"road_types":"6",
"instruction":"行驶230米,右转进入荷清路",
"path":"116.34091891875,40.009371397007;116.3418805548,40.009336649844;116.34238127029,40.009304527699;116.34249149238,40.00930411322;116.34334245719,40.009311090289;116.34351268608,40.009320554234;116.34361275732,40.009320277914",
"traffic_condition":[
{
"status":0,
"geo_cnt":6
}
],
"start_location":{
"lng":"116.34091891875",
"lat":"40.009371397007"
},
"end_location":{
"lng":"116.34361275732",
"lat":"40.009320277914"
}
},
{
"leg_index":0,
"distance":375,
"duration":73,
"direction":6,
"turn":7,
"road_type":5,
"road_types":"5",
"instruction":"沿荷清路行驶380米,左转进入清华东路",
"path":"116.34361275732,40.009320277914;116.34363305902,40.008830361628;116.34368390311,40.007600443365;116.3436941438,40.007110514637;116.34370420482,40.007050482236;116.3437447184,40.006150542489;116.34383481844,40.006060319882;116.34394495069,40.006060043549",
"traffic_condition":[
{
"status":2,
"geo_cnt":7
}
],
"start_location":{
"lng":"116.34361275732",
"lat":"40.009320277914"
},
"end_location":{
"lng":"116.34394495069",
"lat":"40.006060043549"
}
},
{
"leg_index":0,
"distance":1952,
"duration":385,
"direction":3,
"turn":9,
"road_type":4,
"road_types":"5,4",
"instruction":"沿清华东路行驶2.0公里,靠左",
"path":"116.34394495069,40.006060043549;116.34451537469,40.006088713073;116.34480552737,40.006148193663;116.34510565124,40.006197657156;116.34522575469,40.006217483993;116.34618604328,40.006246637032;116.3465459943,40.006266532938;116.34665603672,40.006256515903;116.34691600634,40.006266602021;116.34725592514,40.006266740187;116.34771585756,40.006297067615;116.34901507682,40.006329260269;116.3495345669,40.006350537808;116.35009403157,40.006362212819;116.35050347922,40.006373680579;116.35055342501,40.006373818745;116.35162186958,40.006408360179;116.35194130702,40.006419897015;116.352001224,40.006420173346;116.35310910418,40.006466389749;116.35428642339,40.006504178026;116.35497461524,40.006529324144;116.35537355271,40.006552466853;116.35557297654,40.006564072747;116.35711815184,40.006607871159;116.35761653174,40.00662279301;116.35838377448,40.006650633305;116.35892176965,40.006676470194;116.35909110024,40.006688352396;116.35925054946,40.006690148543;116.35945967499,40.00669249735;116.35962900558,40.006704448632;116.35989795825,40.006707557346;116.36055524839,40.006745483653;116.36093361467,40.006760129143;116.36163052008,40.006799022575;116.3625661951,40.00684150827;116.36294438172,40.006856706399;116.36400923307,40.006911834126;116.36464595202,40.006941194113;116.36674475301,40.007033626178",
"traffic_condition":[
{
"status":1,
"geo_cnt":40
}
],
"start_location":{
"lng":"116.34394495069",
"lat":"40.006060043549"
},
"end_location":{
"lng":"116.36674475301",
"lat":"40.007033626178"
}
},
{
"leg_index":0,
"distance":497,
"duration":95,
"direction":3,
"turn":9,
"road_type":4,
"road_types":"4",
"instruction":"继续沿清华东路行驶500米,靠左",
"path":"116.36674475301,40.007033626178;116.36719228882,40.007060775482;116.3675900585,40.007077286122;116.36804747566,40.007094832991;116.36819659438,40.007097319948;116.36828606561,40.007108787584;116.36846509789,40.007111758116;116.36996625623,40.007187333928;116.37123861616,40.007239629024;116.37132799755,40.00724121791;116.37142743997,40.00724294496;116.37146714508,40.00724363578;116.37170573502,40.007247918864;116.37190453003,40.007251442046;116.37254062016,40.007282874344",
"traffic_condition":[
{
"status":1,
"geo_cnt":14
}
],
"start_location":{
"lng":"116.36674475301",
"lat":"40.007033626178"
},
"end_location":{
"lng":"116.37254062016",
"lat":"40.007282874344"
}
},
{
"leg_index":0,
"distance":320,
"duration":58,
"direction":3,
"turn":3,
"road_type":4,
"road_types":"4",
"instruction":"继续沿清华东路行驶320米,右转进入g6辅路",
"path":"116.37254062016,40.007282874344;116.37281882538,40.007297865128;116.37327597305,40.007316102759;116.37354429691,40.007340972247;116.37360394439,40.007342077557;116.37412073955,40.007361489568;116.37479644496,40.00739381988;116.37590935565,40.007454266468;116.37626715074,40.007460829237",
"traffic_condition":[
{
"status":1,
"geo_cnt":8
}
],
"start_location":{
"lng":"116.37254062016",
"lat":"40.007282874344"
},
"end_location":{
"lng":"116.37626715074",
"lat":"40.007460829237"
}
},
{
"leg_index":0,
"distance":353,
"duration":68,
"direction":5,
"turn":9,
"road_type":5,
"road_types":"5",
"instruction":"沿g6辅路行驶350米,靠左",
"path":"116.37626715074,40.007460829237;116.37665494923,40.006998048829;116.37666492042,40.00697822222;116.37742057501,40.006022324108;116.37782831589,40.005489897448;116.37837520428,40.004769971468",
"traffic_condition":[
{
"status":1,
"geo_cnt":5
}
],
"start_location":{
"lng":"116.37626715074",
"lat":"40.007460829237"
},
"end_location":{
"lng":"116.37837520428",
"lat":"40.004769971468"
}
},
{
"leg_index":0,
"distance":47,
"duration":5,
"direction":4,
"turn":1,
"road_type":5,
"road_types":"5",
"instruction":"行驶50米,直行进入京藏高速",
"path":"116.37837520428,40.004769971468;116.37878276549,40.004497501565",
"traffic_condition":[
{
"status":1,
"geo_cnt":1
}
],
"start_location":{
"lng":"116.37837520428",
"lat":"40.004769971468"
},
"end_location":{
"lng":"116.37878276549",
"lat":"40.004497501565"
}
},
{
"leg_index":0,
"distance":411,
"duration":79,
"direction":5,
"turn":9,
"road_type":0,
"road_types":"0",
"instruction":"沿京藏高速行驶410米,朝北四环,亚运村,中关村方向,靠左",
"path":"116.37878276549,40.004497501565;116.37987645245,40.003087535205;116.38005548474,40.002870811329;116.38122867173,40.00136208443",
"traffic_condition":[
{
"status":2,
"geo_cnt":3
}
],
"start_location":{
"lng":"116.37878276549",
"lat":"40.004497501565"
},
"end_location":{
"lng":"116.38122867173",
"lat":"40.00136208443"
}
},
{
"leg_index":0,
"distance":535,
"duration":105,
"direction":5,
"turn":9,
"road_type":0,
"road_types":"0",
"instruction":"继续沿京藏高速行驶540米,朝北三环,马甸桥,g6,京藏高速方向,靠左",
"path":"116.38122867173,40.00136208443;116.38148720406,40.001036679178;116.38274986228,39.99939898961;116.38327689813,39.998578195436;116.38346581177,39.998191423825;116.38363487287,39.997784337065;116.38386358145,39.997078285846",
"traffic_condition":[
{
"status":1,
"geo_cnt":6
}
],
"start_location":{
"lng":"116.38122867173",
"lat":"40.00136208443"
},
"end_location":{
"lng":"116.38386358145",
"lat":"39.997078285846"
}
},
{
"leg_index":0,
"distance":697,
"duration":137,
"direction":5,
"turn":9,
"road_type":0,
"road_types":"0",
"instruction":"继续沿京藏高速行驶700米,朝北三环,g6,京藏高速,g110方向,靠左",
"path":"116.38386358145,39.997078285846;116.38416181888,39.996093366997;116.38457935128,39.994700361217;116.3846887649,39.99434217287;116.38506641253,39.993058372687;116.38538441268,39.991903553605;116.38554332293,39.991336121378;116.38564267552,39.990987727244",
"traffic_condition":[
{
"status":1,
"geo_cnt":7
}
],
"start_location":{
"lng":"116.38386358145",
"lat":"39.997078285846"
},
"end_location":{
"lng":"116.38564267552",
"lat":"39.990987727244"
}
},
{
"leg_index":0,
"distance":1607,
"duration":316,
"direction":5,
"turn":9,
"road_type":0,
"road_types":"0",
"instruction":"继续沿京藏高速行驶1.6公里,朝北二环,德胜门桥方向,靠左",
"path":"116.38564267552,39.990987727244;116.38596067567,39.989932791046;116.38605993843,39.989594340098;116.38677507944,39.987085410908;116.3869240185,39.986557672627;116.387053105,39.98607961573;116.38728145426,39.985263013779;116.38743030348,39.984725241089;116.38748986114,39.984496088644;116.38752956624,39.984336731873;116.38760897645,39.983977866792;116.38763871036,39.983798260774;116.38766844427,39.983628674663;116.38768820699,39.983408986075;116.38771794091,39.983169324985;116.38771749175,39.98257922159;116.38769736971,39.982168862085;116.3876773375,39.981988491089;116.38761724086,39.981347444537;116.38754717303,39.980776192038;116.38745716282,39.980034648527;116.3874371306,39.979854271852;116.38736697294,39.979253081913;116.38732699835,39.978932339128;116.38722683728,39.978100584717;116.38719683388,39.977830080917;116.38706657958,39.976727735672",
"traffic_condition":[
{
"status":1,
"geo_cnt":26
}
],
"start_location":{
"lng":"116.38564267552",
"lat":"39.990987727244"
},
"end_location":{
"lng":"116.38706657958",
"lat":"39.976727735672"
}
},
{
"leg_index":0,
"distance":186,
"duration":31,
"direction":6,
"turn":1,
"road_type":0,
"road_types":"0",
"instruction":"继续沿京藏高速行驶190米,直行进入京青线",
"path":"116.38706657958,39.976727735672;116.38687631847,39.975204327244;116.38686625745,39.975104110899;116.38685628626,39.975063955205",
"traffic_condition":[
{
"status":1,
"geo_cnt":3
}
],
"start_location":{
"lng":"116.38706657958",
"lat":"39.976727735672"
},
"end_location":{
"lng":"116.38685628626",
"lat":"39.975063955205"
}
},
{
"leg_index":0,
"distance":354,
"duration":68,
"direction":6,
"turn":1,
"road_type":1,
"road_types":"0,1",
"instruction":"沿京青线行驶350米,直行进入德胜门外大街",
"path":"116.38685628626,39.975063955205;116.386816132,39.974673248045;116.38680607098,39.974573030915;116.38679600996,39.974432864915;116.38677597775,39.97429249128;116.38674588451,39.973991906874;116.38671588111,39.973791401336;116.3866958489,39.973600986187;116.38667581668,39.97345065806;116.38666575566,39.97332044253;116.38665569464,39.973240267238;116.38662560141,39.972999740795;116.38658553698,39.972669015543;116.38654538272,39.972298200462;116.38651537932,39.972047648585;116.38648537592,39.971887156661",
"traffic_condition":[
{
"status":1,
"geo_cnt":1
},
{
"status":3,
"geo_cnt":14
}
],
"start_location":{
"lng":"116.38685628626",
"lat":"39.975063955205"
},
"end_location":{
"lng":"116.38648537592",
"lat":"39.971887156661"
}
},
{
"leg_index":0,
"distance":179,
"duration":31,
"direction":6,
"turn":9,
"road_type":1,
"road_types":"1",
"instruction":"沿德胜门外大街行驶180米,朝人定湖西里,新外大街,二环路,德胜门桥方向,靠左",
"path":"116.38648537592,39.971887156661;116.38643516064,39.971376164987;116.38629484532,39.970283598926",
"traffic_condition":[
{
"status":3,
"geo_cnt":1
},
{
"status":2,
"geo_cnt":1
}
],
"start_location":{
"lng":"116.38648537592",
"lat":"39.971887156661"
},
"end_location":{
"lng":"116.38629484532",
"lat":"39.970283598926"
}
},
{
"leg_index":0,
"distance":330,
"duration":63,
"direction":6,
"turn":9,
"road_type":1,
"road_types":"1",
"instruction":"继续沿德胜门外大街行驶330米,朝二环路,德胜门桥,g110方向,靠左",
"path":"116.38629484532,39.970283598926;116.38625478089,39.969932884737;116.38594387735,39.967317055396",
"traffic_condition":[
{
"status":3,
"geo_cnt":2
}
],
"start_location":{
"lng":"116.38629484532",
"lat":"39.970283598926"
},
"end_location":{
"lng":"116.38594387735",
"lat":"39.967317055396"
}
},
{
"leg_index":0,
"distance":1093,
"duration":211,
"direction":6,
"turn":1,
"road_type":4,
"road_types":"1,4",
"instruction":"行驶1.1公里,直行进入德胜门外大街",
"path":"116.38594387735,39.967317055396;116.38591378412,39.967056462284;116.38589375191,39.966876051081;116.38587362986,39.966665708984;116.3858034722,39.96608437893;116.38575334676,39.965683389623;116.38572307386,39.965292766663;116.38571301284,39.965102535024;116.38570286199,39.964972372589;116.38569271113,39.964752139668;116.38568238062,39.964281809341;116.38567178062,39.963661402429;116.38570052639,39.962541544948;116.3857002569,39.962311487986;116.38573807556,39.960231400288;116.38574786709,39.960101574155;116.38574786709,39.960081526434;116.38576655185,39.958791477697;116.3857561315,39.958271123675;116.38569621453,39.957930025887;116.38559659244,39.957718342531;116.38554673649,39.957597498829;116.38548699917,39.95751654449",
"traffic_condition":[
{
"status":3,
"geo_cnt":21
},
{
"status":1,
"geo_cnt":1
}
],
"start_location":{
"lng":"116.38594387735",
"lat":"39.967317055396"
},
"end_location":{
"lng":"116.38548699917",
"lat":"39.95751654449"
}
},
{
"leg_index":0,
"distance":56,
"duration":10,
"direction":7,
"turn":9,
"road_type":4,
"road_types":"4",
"instruction":"沿德胜门外大街行驶60米,靠左",
"path":"116.38548699917,39.95751654449;116.38531775841,39.957293660311;116.38519819395,39.957061649823",
"traffic_condition":[
{
"status":1,
"geo_cnt":2
}
],
"start_location":{
"lng":"116.38548699917",
"lat":"39.95751654449"
},
"end_location":{
"lng":"116.38519819395",
"lat":"39.957061649823"
}
},
{
"leg_index":0,
"distance":132,
"duration":21,
"direction":6,
"turn":7,
"road_type":4,
"road_types":"4",
"instruction":"继续沿德胜门外大街行驶130米,朝德胜门内大街,厂桥,鼓楼西大街,鼓楼方向,左转进入德胜门桥",
"path":"116.38519819395,39.957061649823;116.38516828038,39.956921101963;116.38515830919,39.956860955963;116.38514824816,39.956770736863;116.3851480685,39.956580688725;116.38512785663,39.956160216563;116.38509785322,39.956009711507;116.38505796846,39.9558690232",
"traffic_condition":[
{
"status":1,
"geo_cnt":7
}
],
"start_location":{
"lng":"116.38519819395",
"lat":"39.957061649823"
},
"end_location":{
"lng":"116.38505796846",
"lat":"39.9558690232"
}
},
{
"leg_index":0,
"distance":140,
"duration":26,
"direction":4,
"turn":14,
"road_type":4,
"road_types":"4",
"instruction":"沿德胜门桥行驶140米,由环岛走第2出口",
"path":"116.38505796846,39.9558690232;116.38519711598,39.955741262754;116.38542555507,39.955464931573;116.38544540763,39.955445228156;116.38548511273,39.955335856804;116.38549490426,39.955176016684;116.38550460596,39.954876038903;116.38551439749,39.954726153219",
"traffic_condition":[
{
"status":2,
"geo_cnt":3
},
{
"status":1,
"geo_cnt":4
}
],
"start_location":{
"lng":"116.38505796846",
"lat":"39.9558690232"
},
"end_location":{
"lng":"116.38551439749",
"lat":"39.954726153219"
}
},
{
"leg_index":0,
"distance":48,
"duration":5,
"direction":5,
"turn":7,
"road_type":4,
"road_types":"4",
"instruction":"继续沿德胜门桥行驶50米,左转",
"path":"116.38551439749,39.954726153219;116.38556407378,39.954636968314;116.38565354501,39.954558430192;116.38573304505,39.954509689499;116.38582251628,39.954491161112;116.38591198751,39.95446260803",
"traffic_condition":[
{
"status":1,
"geo_cnt":5
}
],
"start_location":{
"lng":"116.38551439749",
"lat":"39.954726153219"
},
"end_location":{
"lng":"116.38591198751",
"lat":"39.95446260803"
}
},
{
"leg_index":0,
"distance":183,
"duration":31,
"direction":2,
"turn":9,
"road_type":4,
"road_types":"4",
"instruction":"继续沿德胜门桥行驶180米,靠左",
"path":"116.38591198751,39.95446260803;116.38607116724,39.954515151223;116.38614078592,39.954546262306;116.38619055205,39.954577096831;116.38623034698,39.954607723936;116.38631002668,39.954749037078;116.38648905897,39.954751871635;116.38656864884,39.954753185209;116.38707592196,39.95477116044;116.38753342895,39.954788236905;116.38765281376,39.954790034427;116.38788161217,39.954803515843",
"traffic_condition":[
{
"status":1,
"geo_cnt":11
}
],
"start_location":{
"lng":"116.38591198751",
"lat":"39.95446260803"
},
"end_location":{
"lng":"116.38788161217",
"lat":"39.954803515843"
}
},
{
"leg_index":0,
"distance":36,
"duration":5,
"direction":2,
"turn":1,
"road_type":4,
"road_types":"4",
"instruction":"继续沿德胜门桥行驶40米,直行进入德胜门东大街",
"path":"116.38788161217,39.954803515843;116.38816026654,39.954877767288;116.38827965134,39.954919594183",
"traffic_condition":[
{
"status":1,
"geo_cnt":2
}
],
"start_location":{
"lng":"116.38788161217",
"lat":"39.954803515843"
},
"end_location":{
"lng":"116.38827965134",
"lat":"39.954919594183"
}
},
{
"leg_index":0,
"distance":144,
"duration":26,
"direction":3,
"turn":10,
"road_type":4,
"road_types":"4",
"instruction":"沿德胜门东大街行驶140米,靠右",
"path":"116.38827965134,39.954919594183;116.38866771932,39.954915307792;116.38897619743,39.954919870724;116.38937414677,39.954925608957;116.38984189445,39.954932176814;116.38997134028,39.954943998954",
"traffic_condition":[
{
"status":1,
"geo_cnt":5
}
],
"start_location":{
"lng":"116.38827965134",
"lat":"39.954919594183"
},
"end_location":{
"lng":"116.38997134028",
"lat":"39.954943998954"
}
},
{
"leg_index":0,
"distance":280,
"duration":52,
"direction":3,
"turn":9,
"road_type":4,
"road_types":"4",
"instruction":"继续沿德胜门东大街行驶280米,靠左",
"path":"116.38997134028,39.954943998954;116.39113590354,39.954969786423;116.3932369503,39.955005944171",
"traffic_condition":[
{
"status":1,
"geo_cnt":2
}
],
"start_location":{
"lng":"116.38997134028",
"lat":"39.954943998954"
},
"end_location":{
"lng":"116.3932369503",
"lat":"39.955005944171"
}
},
{
"leg_index":0,
"distance":37,
"duration":5,
"direction":2,
"turn":1,
"road_type":4,
"road_types":"4",
"instruction":"行驶40米,直行进入北二环",
"path":"116.3932369503,39.955005944171;116.39362555726,39.955150436699",
"traffic_condition":[
{
"status":1,
"geo_cnt":1
}
],
"start_location":{
"lng":"116.3932369503",
"lat":"39.955005944171"
},
"end_location":{
"lng":"116.39362555726",
"lat":"39.955150436699"
}
},
{
"leg_index":0,
"distance":1394,
"duration":274,
"direction":3,
"turn":9,
"road_type":1,
"road_types":"1",
"instruction":"沿北二环行驶1.4公里,朝安定门桥,雍和宫桥方向,靠左",
"path":"116.39362555726,39.955150436699;116.39552861748,39.95519067332;116.39610667708,39.95519627326;116.39626612631,39.955197794231;116.3973728387,39.9552275223;116.3978215423,39.955231186456;116.39830033914,39.955234850613;116.39868930542,39.955237754283;116.39964707876,39.955254208416;116.39981676867,39.955255245441;116.40047540627,39.955269141575;116.40105436417,39.955272183514;116.40197288155,39.955276469883;116.40367094846,39.955312212657;116.40493010329,39.955324726081;116.40678977536,39.955325624835;116.40994192939,39.955349614651",
"traffic_condition":[
{
"status":1,
"geo_cnt":16
}
],
"start_location":{
"lng":"116.39362555726",
"lat":"39.955150436699"
},
"end_location":{
"lng":"116.40994192939",
"lat":"39.955349614651"
}
},
{
"leg_index":0,
"distance":798,
"duration":153,
"direction":3,
"turn":9,
"road_type":1,
"road_types":"1",
"instruction":"继续沿北二环行驶800米,朝雍和宫桥,小街桥方向,靠左",
"path":"116.40994192939,39.955349614651;116.4115141437,39.955353140531;116.41181462689,39.955351688698;116.41219532876,39.955349614651;116.41702794292,39.955362957686;116.41780066532,39.955385288252;116.41930631518,39.955409001508",
"traffic_condition":[
{
"status":1,
"geo_cnt":6
}
],
"start_location":{
"lng":"116.40994192939",
"lat":"39.955349614651"
},
"end_location":{
"lng":"116.41930631518",
"lat":"39.955409001508"
}
},
{
"leg_index":0,
"distance":767,
"duration":147,
"direction":3,
"turn":9,
"road_type":1,
"road_types":"1",
"instruction":"继续沿北二环行驶770米,朝小街桥,东直门桥方向,靠左",
"path":"116.41930631518,39.955409001508;116.42076228875,39.955441633146;116.42142514839,39.955453247794;116.42291202367,39.955483390559;116.42311297461,39.955480625168;116.42331392555,39.955487815184;116.42459032785,39.955509385227;116.42638981345,39.95555190308;116.42669146444,39.955557088182;116.42673170853,39.95555646597;116.42708366463,39.95556089059;116.42834066353,39.955580386569",
"traffic_condition":[
{
"status":1,
"geo_cnt":1
},
{
"status":2,
"geo_cnt":10
}
],
"start_location":{
"lng":"116.41930631518",
"lat":"39.955409001508"
},
"end_location":{
"lng":"116.42834066353",
"lat":"39.955580386569"
}
},
{
"leg_index":0,
"distance":588,
"duration":116,
"direction":3,
"turn":9,
"road_type":1,
"road_types":"1",
"instruction":"继续沿北二环行驶590米,朝东四十条桥,东直门桥,民安街方向,靠左",
"path":"116.42834066353,39.955580386569;116.43076492061,39.955629195628;116.43194206015,39.955648553319;116.43223382978,39.955643368224;116.43324002178,39.955665491294;116.43369276775,39.955667357928;116.43447761728,39.955673165232;116.43527261765,39.955688789644",
"traffic_condition":[
{
"status":2,
"geo_cnt":7
}
],
"start_location":{
"lng":"116.42834066353",
"lat":"39.955580386569"
},
"end_location":{
"lng":"116.43527261765",
"lat":"39.955688789644"
}
},
{
"leg_index":0,
"distance":349,
"duration":68,
"direction":3,
"turn":1,
"road_type":1,
"road_types":"1",
"instruction":"继续沿北二环行驶350米,直行进入东二环",
"path":"116.43527261765,39.955688789644;116.43710408293,39.955695564831;116.43756688993,39.955637146109;116.43847238188,39.955380656216;116.43878418372,39.955234988883;116.43916632289,39.954997993616",
"traffic_condition":[
{
"status":1,
"geo_cnt":2
},
{
"status":2,
"geo_cnt":3
}
],
"start_location":{
"lng":"116.43527261765",
"lat":"39.955688789644"
},
"end_location":{
"lng":"116.43916632289",
"lat":"39.954997993616"
}
},
{
"leg_index":0,
"distance":123,
"duration":21,
"direction":4,
"turn":9,
"road_type":1,
"road_types":"1",
"instruction":"沿东二环行驶120米,朝东直门桥,东四十条桥方向,靠左",
"path":"116.43916632289,39.954997993616;116.43936745349,39.954844374888;116.43965904346,39.954559052414;116.43998063683,39.954083120517",
"traffic_condition":[
{
"status":2,
"geo_cnt":3
}
],
"start_location":{
"lng":"116.43916632289",
"lat":"39.954997993616"
},
"end_location":{
"lng":"116.43998063683",
"lat":"39.954083120517"
}
},
{
"leg_index":0,
"distance":1112,
"duration":216,
"direction":5,
"turn":2,
"road_type":1,
"road_types":"1",
"instruction":"继续沿东二环行驶1.1公里,右前方转弯",
"path":"116.43998063683,39.954083120517;116.44015131488,39.953669961359;116.44024141492,39.953078218483;116.44018976235,39.951268665928;116.44018958269,39.951028614679;116.44018949286,39.950838550458;116.44016874201,39.949928668528;116.44016865218,39.94987867998;116.44016847251,39.949488588279;116.4401872471,39.947377822788;116.4402172505,39.947017171803;116.44022713186,39.946726976358;116.44026674714,39.945396016426;116.44033663531,39.944084529677",
"traffic_condition":[
{
"status":1,
"geo_cnt":5
},
{
"status":3,
"geo_cnt":8
}
],
"start_location":{
"lng":"116.43998063683",
"lat":"39.954083120517"
},
"end_location":{
"lng":"116.44033663531",
"lat":"39.944084529677"
}
},
{
"leg_index":0,
"distance":31,
"duration":5,
"direction":7,
"turn":1,
"road_type":4,
"road_types":"4",
"instruction":"行驶30米,直行进入东直门南大街",
"path":"116.44033663531,39.944084529677;116.4401754793,39.943837400059",
"traffic_condition":[
{
"status":3,
"geo_cnt":1
}
],
"start_location":{
"lng":"116.44033663531",
"lat":"39.944084529677"
},
"end_location":{
"lng":"116.4401754793",
"lat":"39.943837400059"
}
},
{
"leg_index":0,
"distance":212,
"duration":36,
"direction":6,
"turn":10,
"road_type":4,
"road_types":"4",
"instruction":"沿东直门南大街行驶210米,靠右",
"path":"116.4401754793,39.943837400059;116.44019551151,39.943416987226;116.44021545389,39.943016555411;116.44021545389,39.942926525346;116.44021536406,39.942816511487;116.44022542508,39.942636312411;116.44022533525,39.942586318492;116.44024527764,39.941935910155",
"traffic_condition":[
{
"status":1,
"geo_cnt":7
}
],
"start_location":{
"lng":"116.4401754793",
"lat":"39.943837400059"
},
"end_location":{
"lng":"116.44024527764",
"lat":"39.941935910155"
}
},
{
"leg_index":0,
"distance":443,
"duration":84,
"direction":6,
"turn":14,
"road_type":4,
"road_types":"4",
"instruction":"继续沿东直门南大街行驶440米,朝工人体育场北路,工人体育场方向,由环岛走第4出口进入工人体育场北路",
"path":"116.44024527764,39.941935910155;116.44027537087,39.941655304676;116.44020494372,39.941626607895;116.44016469963,39.941547294077;116.44016451997,39.940997280971;116.44018455218,39.940686868037;116.44018446235,39.940196801333;116.44016425048,39.940037202156;116.44013406741,39.940017701711;116.43989260289,39.939822005445;116.43987248085,39.939742343764;116.43988245204,39.939552178785;116.43992269613,39.939431441034;116.43998306226,39.939360353644;116.44010379452,39.93926817504;116.44021446576,39.939226200195;116.44025470984,39.939205523944;116.44034525904,39.939193906516;116.44038550313,39.939193145851;116.44087849319,39.93922440226;116.44091873728,39.939233737689;116.44103946954,39.939241551788;116.4411602018,39.939299431414;116.44134130019,39.93946629319;116.44138163411,39.939555567183",
"traffic_condition":[
{
"status":1,
"geo_cnt":24
}
],
"start_location":{
"lng":"116.44024527764",
"lat":"39.941935910155"
},
"end_location":{
"lng":"116.44138163411",
"lat":"39.939555567183"
}
},
{
"leg_index":0,
"distance":213,
"duration":36,
"direction":3,
"turn":9,
"road_type":4,
"road_types":"4",
"instruction":"沿工人体育场北路行驶210米,靠左进入工人体育场北路辅路",
"path":"116.44138163411,39.939555567183;116.44203551069,39.939554115013;116.44250837871,39.939545886043;116.44314204341,39.939535029335;116.44388637936,39.939542359342",
"traffic_condition":[
{
"status":1,
"geo_cnt":4
}
],
"start_location":{
"lng":"116.44138163411",
"lat":"39.939555567183"
},
"end_location":{
"lng":"116.44388637936",
"lat":"39.939542359342"
}
},
{
"leg_index":0,
"distance":686,
"duration":131,
"direction":3,
"turn":3,
"road_type":7,
"road_types":"4,5,7",
"instruction":"沿工人体育场北路辅路行驶690米,右转",
"path":"116.44388637936,39.939542359342;116.44495248834,39.939534614429;116.44522404609,39.939530188764;116.44544529874,39.939526523759;116.44631000762,39.939502666652;116.44878295286,39.939464979319;116.44944626165,39.939465394226;116.45004911448,39.939456957793;116.45027018747,39.939443888235;116.45027018747,39.939363880354;116.45037061802,39.939362497331;116.45117433196,39.939361736668;116.4513752829,39.939359108922;116.45186737466,39.939352816163",
"traffic_condition":[
{
"status":1,
"geo_cnt":10
},
{
"status":0,
"geo_cnt":3
}
],
"start_location":{
"lng":"116.44388637936",
"lat":"39.939542359342"
},
"end_location":{
"lng":"116.45186737466",
"lat":"39.939352816163"
}
},
{
"leg_index":0,
"distance":42,
"duration":5,
"direction":6,
"turn":7,
"road_type":6,
"road_types":"6",
"instruction":"行驶40米,左转",
"path":"116.45186737466,39.939352816163;116.45186737466,39.939312777606;116.45186737466,39.939152761442;116.45187743568,39.939072684067;116.45188740688,39.93897255264",
"traffic_condition":[
{
"status":0,
"geo_cnt":4
}
],
"start_location":{
"lng":"116.45186737466",
"lat":"39.939352816163"
},
"end_location":{
"lng":"116.45188740688",
"lat":"39.93897255264"
}
},
{
"leg_index":0,
"distance":51,
"duration":5,
"direction":3,
"turn":3,
"road_type":6,
"road_types":"6",
"instruction":"行驶50米,右转",
"path":"116.45188740688,39.93897255264;116.45248999021,39.938945030302",
"traffic_condition":[
{
"status":0,
"geo_cnt":1
}
],
"start_location":{
"lng":"116.45188740688",
"lat":"39.93897255264"
},
"end_location":{
"lng":"116.45248999021",
"lat":"39.938945030302"
}
},
{
"leg_index":0,
"distance":151,
"duration":26,
"direction":3,
"turn":3,
"road_type":6,
"road_types":"6",
"instruction":"行驶150米,右转",
"path":"116.45248999021,39.938945030302;116.4526807903,39.938942679147;116.45273100558,39.938882102302;116.45270082251,39.938502458511;116.45267063945,39.938432822343;116.45266057843,39.938292927422;116.45272085473,39.93821215751;116.45282119545,39.938020950955;116.45298190231,39.937808998033",
"traffic_condition":[
{
"status":0,
"geo_cnt":8
}
],
"start_location":{
"lng":"116.45248999021",
"lat":"39.938945030302"
},
"end_location":{
"lng":"116.45298190231",
"lat":"39.937808998033"
}
},
{
"leg_index":0,
"distance":169,
"duration":31,
"direction":8,
"turn":0,
"road_type":6,
"road_types":"6",
"instruction":"行驶170米,到达终点(在道路左侧)",
"path":"116.45298190231,39.937808998033;116.45269067166,39.937532524679;116.45252996481,39.937314484744;116.45239935119,39.936996033153;116.45235919693,39.936696528241;116.45234913591,39.936596669926;116.45238929016,39.936406150364",
"traffic_condition":[
{
"status":0,
"geo_cnt":6
}
],
"start_location":{
"lng":"116.45298190231",
"lat":"39.937808998033"
},
"end_location":{
"lng":"116.45238929016",
"lat":"39.936406150364"
}
}
]
}
]
}
}
在线运行
参数备注必选
origin
40.01116,116.339303
destination
39.936404,116.452562

上一篇

使用准备

下一篇

骑行路线规划

本篇文章对您是否有帮助?

网站地图