步行路径规划
GET
/v3/direction/walking接口简介:
步行路径规划 API 可以规划100KM以内的步行通勤方案,并且返回通勤方案的数据。最大支持 100km 的步行路线规划。
parameters 代表的参数包括必填参数和可选参数。所有参数均使用和号字符(&)进行分隔。下面的列表枚举了这些参数及其使用规则。
- 服务示例
https://restapi.amap.com/v3/direction/walking?origin=116.434307,39.90909&destination=116.434446,39.90816&key=<用户的key>
参数 | 值 | 备注 | 必选 |
---|---|---|---|
origin | lon,lat(经度,纬度),如117.500244, 40.417801 经纬度小数点不超过6位 | 是 | |
destination | lon,lat(经度,纬度),如117.500244, 40.417801 经纬度小数点不超过6位 | 是 |
- 步行动作列表
主要动作列表 | 辅助动作列表 |
---|---|
无基本导航动作 | 无辅助导航动作 |
左转 | 左转 |
右转 | 右转 |
向左前方 | 向左前方 |
向右前方 | 向右前方 |
向左后方 | 向左后方 |
向右后方 | 向右后方 |
直行 | 往后走 |
靠左 | 往前走 |
靠右 | 靠左 |
通过人行横道 | 靠右 |
通过过街天桥 | 通过人行横道 |
通过地下通道 | 通过过街天桥 |
通过广场 | 通过地下通道 |
到道路斜对面 | 通过广场 |
到达目的地 | |
进入右侧道路 | |
进入左侧道路 |
请求参数
Query 参数
origin
string
必需
出发点 规则: lon,lat(经度,纬度), “,”分割,如117.500244, 40.417801 经纬度小数点不超过6位
示例值:
116.481028,39.989643
destination
string
必需
目的地 规则: lon,lat(经度,纬度), “,”分割,如117.500244, 40.417801 经纬度小数点不超过6位
示例值:
116.434446,39.90816
sig
string
可选
数字签名数字签名获取和使用方法
output
string
可选
返回数据格式类型 可选值:JSON,XML
示例值:
JSON
callback
string
可选
回调函数 callback值是用户定义的函数名称,此参数只在output=JSON时有效
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
status
string
可选
返回状态 值为0或1 1:成功;0:失败
info
string
可选
返回的状态信息,status为0时,info返回错误原;否则返回“OK”。详情参阅info状态表
count
string
返回结果总数目
route
object
路线信息列表
origin
string
起点坐标
destination
string
终点坐标
paths
object
步行方案
示例成功示例
{
"status": "1",
"info": "ok",
"infocode": "10000",
"count": "1",
"route": {
"origin": "116.481028,39.989643",
"destination": "116.434446,39.90816",
"paths": [
{
"distance": "11020",
"duration": "8816",
"steps": [
{
"instruction": "向南步行16米左转",
"orientation": "南",
"road": [],
"distance": "16",
"duration": "13",
"polyline": "116.480885,39.989371;116.480907,39.989353;116.48089,39.989227",
"action": "左转",
"assistant_action": [],
"walk_type": "0"
},
{
"instruction": "向东南步行292米右转",
"orientation": "东南",
"road": [],
"distance": "292",
"duration": "234",
"polyline": "116.480885,39.989223;116.480933,39.989201;116.480933,39.989201;116.480955,39.989184;116.481155,39.989058;116.481155,39.989058;116.481428,39.98888;116.481428,39.98888;116.481467,39.988859;116.481467,39.988859;116.482574,39.988125;116.48322,39.987665;116.48322,39.987665;116.48332,39.987565;116.48332,39.987565;116.48342,39.987435",
"action": "右转",
"assistant_action": [],
"walk_type": "0"
},
{
"instruction": "沿望京东路辅路向西南步行193米直行",
"orientation": "西南",
"road": "望京东路辅路",
"distance": "193",
"duration": "154",
"polyline": "116.48342,39.987431;116.483368,39.987387;116.483368,39.987387;116.48263,39.986753;116.48263,39.986753;116.482591,39.986719;116.482591,39.986719;116.482148,39.986289;116.482014,39.986068",
"action": "直行",
"assistant_action": [],
"walk_type": "0"
},
{
"instruction": "沿望京东路向西南步行93米左转",
"orientation": "西南",
"road": "望京东路",
"distance": "93",
"duration": "74",
"polyline": "116.48201,39.986063;116.481289,39.985434",
"action": "左转",
"assistant_action": [],
"walk_type": "0"
},
{
"instruction": "沿广顺南大街向东南步行160米右转",
"orientation": "东南",
"road": "广顺南大街",
"distance": "160",
"duration": "128",
"polyline": "116.481285,39.98543;116.481411,39.985339;116.481411,39.985339;116.481758,39.98513;116.481758,39.98513;116.482062,39.984926;116.482062,39.984926;116.482396,39.984701;116.482396,39.984701;116.482444,39.984666;116.482444,39.984666;116.482726,39.98447",
"action": "右转",
"assistant_action": [],
"walk_type": "0"
},
{
"instruction": "沿京密路向西南步行3677米直行",
"orientation": "西南",
"road": "京密路",
"distance": "3677",
"duration": "2942",
"polyline": "116.482726,39.984466;116.482591,39.984336;116.482591,39.984336;116.481667,39.98349;116.481667,39.98349;116.481233,39.983086;116.480729,39.982643;116.479983,39.981957;116.479653,39.981667;116.479653,39.981667;116.47809,39.980269;116.47809,39.980269;116.478021,39.980204;116.478021,39.980204;116.477982,39.980165;116.477982,39.980165;116.477205,39.979436;116.477205,39.979436;116.476892,39.979149;116.476892,39.979149;116.476662,39.97895;116.476662,39.97895;116.476055,39.97839;116.476055,39.97839;116.475039,39.977478;116.475039,39.977478;116.475,39.977448;116.475,39.977448;116.47388,39.976428;116.47388,39.976428;116.473286,39.975885;116.473286,39.975885;116.472765,39.97543;116.472765,39.97543;116.4724,39.975104;116.4724,39.975104;116.471315,39.974149;116.471315,39.974149;116.46924,39.972261;116.46924,39.972261;116.468281,39.971402;116.468281,39.971402;116.466997,39.97023;116.466523,39.969805;116.466523,39.969805;116.465486,39.968893;116.465486,39.968893;116.465365,39.968754;116.465365,39.968754;116.464961,39.968381;116.464961,39.968381;116.464939,39.968359;116.464939,39.968359;116.464779,39.968216;116.464779,39.968216;116.464466,39.967934;116.464466,39.967934;116.462817,39.966432;116.462817,39.966432;116.462747,39.96638;116.462747,39.96638;116.460803,39.964601;116.460803,39.964601;116.460182,39.964054;116.460182,39.964054;116.460117,39.963984;116.460117,39.963984;116.460017,39.963898;116.460017,39.963898;116.459405,39.963342;116.459405,39.963342;116.458086,39.962135;116.458086,39.962135;116.457917,39.961988;116.457917,39.961988;116.457773,39.961853;116.457773,39.961853;116.45737,39.961476;116.457339,39.961454;116.457339,39.961454;116.457201,39.961341;116.457201,39.961341;116.45691,39.961085;116.45691,39.961085;116.456766,39.960972;116.456766,39.960972;116.456658,39.960881;116.456658,39.960881;116.45605,39.960473;116.45553,39.960217;116.45553,39.960217;116.455017,39.959965;116.454583,39.959744;116.454227,39.959484",
"action": "直行",
"assistant_action": [],
"walk_type": "0"
},
{
"instruction": "沿香河园路向西南步行549米向右前方行走",
"orientation": "西南",
"road": "香河园路",
"distance": "549",
"duration": "439",
"polyline": "116.454223,39.959479;116.453533,39.958845;116.453533,39.958845;116.453342,39.958676;116.453342,39.958676;116.452908,39.958268;116.452908,39.958268;116.452769,39.958147;116.452769,39.958147;116.452435,39.957843;116.452435,39.957843;116.450929,39.956506;116.450929,39.956506;116.450916,39.956489;116.450916,39.956489;116.450668,39.956285;116.450668,39.956285;116.450456,39.956098;116.450456,39.956098;116.449991,39.955694",
"action": "向右前方行走",
"assistant_action": [],
"walk_type": "0"
},
{
"instruction": "向西南步行633米左转",
"orientation": "西南",
"road": [],
"distance": "633",
"duration": "506",
"polyline": "116.449987,39.95569;116.449631,39.955538;116.449536,39.95546;116.449536,39.95546;116.449275,39.955234;116.449275,39.955234;116.449023,39.955004;116.449023,39.955004;116.448581,39.954531;116.448581,39.954531;116.448442,39.954401;116.448108,39.954132;116.448108,39.954132;116.447643,39.953737;116.447643,39.953737;116.447526,39.95365;116.447526,39.95365;116.446636,39.952999;116.446636,39.952999;116.446237,39.952717;116.446237,39.952717;116.446107,39.952622;116.446107,39.952622;116.445412,39.952118;116.445412,39.952118;116.445126,39.951931;116.445126,39.951931;116.444714,39.951667",
"action": "左转",
"assistant_action": [],
"walk_type": "0"
},
{
"instruction": "沿左家庄南斜街向南步行14米右转",
"orientation": "南",
"road": "左家庄南斜街",
"distance": "14",
"duration": "11",
"polyline": "116.444709,39.951662;116.444714,39.951532",
"action": "右转",
"assistant_action": [],
"walk_type": "0"
},
{
"instruction": "沿香河园路向西南步行971米右转",
"orientation": "西南",
"road": "香河园路",
"distance": "971",
"duration": "777",
"polyline": "116.444714,39.951528;116.444141,39.951124;116.444141,39.951124;116.442604,39.949987;116.442604,39.949987;116.442569,39.949965;116.442569,39.949965;116.442361,39.949818;116.442361,39.949818;116.442201,39.949701;116.442201,39.949701;116.44125,39.948997;116.441202,39.948967;116.441202,39.948967;116.44112,39.948898;116.44112,39.948898;116.440495,39.948372;116.440495,39.948372;116.439891,39.947873;116.439891,39.947873;116.439553,39.947587;116.439201,39.947266;116.43895,39.94701;116.43895,39.94701;116.438898,39.946953;116.438898,39.946953;116.438576,39.946584;116.438576,39.946584;116.438464,39.946441;116.438464,39.946441;116.438294,39.946254;116.438294,39.946254;116.438225,39.946185;116.438225,39.946185;116.437921,39.945781;116.437921,39.945781;116.43783,39.945647;116.43783,39.945647;116.437678,39.945434;116.437344,39.944891",
"action": "右转",
"assistant_action": [],
"walk_type": "0"
},
{
"instruction": "沿香河园路向西步行280米左转",
"orientation": "西",
"road": "香河园路",
"distance": "280",
"duration": "224",
"polyline": "116.437339,39.944887;116.436541,39.944887;116.436541,39.944887;116.435451,39.944874;116.435304,39.944848;116.435304,39.944848;116.434961,39.944839;116.434961,39.944839;116.434831,39.944839;116.434831,39.944839;116.434557,39.944839;116.434557,39.944839;116.434444,39.944839;116.434444,39.944839;116.434258,39.944839;116.434258,39.944839;116.434227,39.944839;116.434227,39.944839;116.434006,39.944835",
"action": "左转",
"assistant_action": [],
"walk_type": "0"
},
{
"instruction": "向南步行62米向右前方行走",
"orientation": "南",
"road": [],
"distance": "62",
"duration": "50",
"polyline": "116.434002,39.944831;116.434049,39.944683;116.434036,39.944271",
"action": "向右前方行走",
"assistant_action": [],
"walk_type": "0"
},
{
"instruction": "步行100米右转",
"orientation": [],
"road": [],
"distance": "100",
"duration": "80",
"polyline": "116.434032,39.944266;116.434023,39.944266;116.434023,39.944266;116.434006,39.944167;116.434006,39.944167;116.433932,39.944167;116.433932,39.944167;116.43355,39.944171;116.43355,39.944171;116.43339,39.944175;116.43339,39.944175;116.43339,39.943898;116.43339,39.943898;116.433464,39.943898",
"action": "右转",
"assistant_action": [],
"walk_type": "4"
},
{
"instruction": "沿东直门北大街向南步行310米直行",
"orientation": "南",
"road": "东直门北大街",
"distance": "310",
"duration": "248",
"polyline": "116.433464,39.943893;116.433485,39.94332;116.433485,39.94332;116.433516,39.942665;116.433516,39.942665;116.433559,39.941667;116.433559,39.941667;116.433559,39.941645;116.433559,39.941645;116.433585,39.941089",
"action": "直行",
"assistant_action": [],
"walk_type": "0"
},
{
"instruction": "沿东直门南大街向南步行1052米直行",
"orientation": "南",
"road": "东直门南大街",
"distance": "1052",
"duration": "842",
"polyline": "116.433585,39.941085;116.433615,39.940486;116.433615,39.940486;116.433655,39.939614;116.433655,39.939614;116.433655,39.938828;116.433655,39.938828;116.433685,39.938164;116.433685,39.938164;116.433689,39.938021;116.433689,39.938021;116.433689,39.938003;116.433689,39.938003;116.433698,39.937839;116.433698,39.937839;116.433707,39.937457;116.433707,39.937457;116.43372,39.937161;116.43372,39.937161;116.433728,39.937088;116.433728,39.937088;116.433746,39.936688;116.433746,39.936688;116.433759,39.936324;116.433759,39.936324;116.433767,39.936111;116.433767,39.936111;116.433798,39.935703;116.433798,39.935703;116.433837,39.935169;116.433867,39.934366;116.433867,39.934366;116.433867,39.934353;116.433867,39.934353;116.433928,39.933142;116.433928,39.933142;116.433928,39.933112;116.433928,39.933112;116.433928,39.932934;116.433941,39.93276;116.433958,39.932227;116.433958,39.932227;116.433971,39.932083;116.433963,39.931897;116.433963,39.931688;116.433945,39.931571;116.433932,39.931528",
"action": "直行",
"assistant_action": [],
"walk_type": "0"
},
{
"instruction": "沿朝阳门北大街向南步行514米",
"orientation": "南",
"road": "朝阳门北大街",
"distance": "514",
"duration": "411",
"polyline": "116.433928,39.931523;116.433941,39.931341;116.433941,39.931341;116.433958,39.931063;116.433958,39.931063;116.433967,39.930803;116.433967,39.930803;116.433971,39.930699;116.433971,39.930699;116.43398,39.930456;116.433997,39.930226;116.433997,39.930226;116.434032,39.929553;116.434032,39.929553;116.434032,39.929497;116.434032,39.929497;116.434071,39.92862;116.434071,39.92862;116.43408,39.928555;116.434089,39.928355;116.434089,39.928355;116.43411,39.927865;116.434119,39.927539;116.434119,39.927539;116.434162,39.92684",
"action": [],
"assistant_action": [],
"walk_type": "0"
},
{
"instruction": "沿朝阳门南大街向南步行1224米直行",
"orientation": "南",
"road": "朝阳门南大街",
"distance": "1224",
"duration": "979",
"polyline": "116.434162,39.926836;116.434219,39.926484;116.434219,39.926484;116.434223,39.926402;116.434249,39.925977;116.43428,39.925061;116.43428,39.925061;116.434284,39.925022;116.434284,39.925022;116.434323,39.923911;116.434323,39.923911;116.434323,39.92388;116.434323,39.92388;116.43434,39.923477;116.434353,39.923273;116.434362,39.922977;116.434362,39.922578;116.434362,39.922578;116.434371,39.922348;116.434371,39.922348;116.434379,39.922001;116.434379,39.922001;116.434379,39.921636;116.434379,39.921636;116.434379,39.921597;116.434379,39.921597;116.434401,39.921094;116.434401,39.921094;116.434414,39.920677;116.434414,39.920677;116.434431,39.920304;116.434431,39.920304;116.434444,39.920052;116.434444,39.920052;116.434453,39.91987;116.43447,39.919766;116.43447,39.919766;116.434475,39.919631;116.434475,39.919631;116.434475,39.919453;116.434475,39.919453;116.434514,39.918451;116.434514,39.918451;116.434523,39.918385;116.434536,39.917982;116.434536,39.917982;116.434562,39.917192;116.434562,39.917192;116.434601,39.916497;116.434601,39.916497;116.434622,39.916063;116.434622,39.916063;116.434631,39.915764;116.434631,39.915764;116.434635,39.915703",
"action": "直行",
"assistant_action": [],
"walk_type": "0"
},
{
"instruction": "沿建国门北大街向南步行843米右转",
"orientation": "南",
"road": "建国门北大街",
"distance": "843",
"duration": "674",
"polyline": "116.434635,39.915699;116.434644,39.91556;116.434644,39.91556;116.434644,39.915417;116.434644,39.915417;116.434661,39.915065;116.434661,39.915065;116.434661,39.914952;116.434661,39.914952;116.434696,39.914297;116.434696,39.914297;116.434757,39.913555;116.434757,39.913555;116.434757,39.91349;116.434757,39.91349;116.434783,39.913173;116.434783,39.913173;116.434787,39.913025;116.434787,39.913025;116.434796,39.912839;116.434796,39.912839;116.434826,39.912244;116.434826,39.912244;116.434852,39.911784;116.434852,39.911784;116.434852,39.911684;116.434883,39.911202;116.434883,39.911202;116.434918,39.910109;116.434918,39.910109;116.434965,39.909045;116.434965,39.909045;116.434965,39.909028;116.434931,39.908932;116.434887,39.908867;116.434887,39.908867;116.434831,39.908724;116.434818,39.908655;116.434818,39.908542;116.434826,39.908424;116.434883,39.908303;116.434883,39.908303;116.434887,39.908077",
"action": "右转",
"assistant_action": [],
"walk_type": "0"
},
{
"instruction": "步行37米到达目的地",
"orientation": [],
"road": [],
"distance": "37",
"duration": "30",
"polyline": "116.434887,39.908073;116.434449,39.908073",
"action": [],
"assistant_action": "到达目的地",
"walk_type": "0"
}
]
}
]
}
}
修改于 2 年前