| 名称 | 含义 | 规则说明 | ||
|---|---|---|---|---|
| origin | 起点坐标 | |||
| destination | 终点坐标 | |||
| distance | 每段线路步行距离 | 单位:米 | ||
| duration | 步行预计时间 | 单位:秒 | ||
| steps | 步行路段列表 | |||
| instruction | 此段路的行走介绍 | |||
| road | 路的名字 | |||
| distance | 此段路的距离 | |||
| duration | 此段路预计消耗时间 | 单位:秒 | ||
| polyline | 此段路的坐标 | |||
| action | 步行主要动作 | |||
| assistant_action | 步行辅助动作 |
| 名称 | 含义 | 规则说明 | ||
|---|---|---|---|---|
| buslines | 步行路段列表 | |||
| departure_stop | 此段起乘站信息 | 格式如:中关村 | ||
| name | 站点名字 | |||
| id | 站点id | |||
| location | 站点经纬度 | |||
| arrival_stop | 此段下车站 | 格式如:中关村 | ||
| name | 站点名字 | |||
| id | 站点id | |||
| location | 站点经纬度 | |||
| name | 公交路线名称 | 格式如:445路(南十里居--地铁望京西站) | ||
| id | 公交路线id | |||
| type | 公交类型 | 格式如:地铁线路 | ||
| distance | 公交行驶距离 | 单位:米 | ||
| duration | 公交预计行驶时间 | 单位:秒 | ||
| polyline | 此路段坐标集 | 格式为坐标串,如:116.481247,39.990704;116.481270,39.990726 | ||
| start_time | 首班车时间 | 格式如:0600,代表06:00 | ||
| end_time | 末班车时间 | 格式如:2300,代表23:00 | ||
| via_num | 此段途经公交站数 | |||
| via_stops | 此段途经公交站点列表 | |||
| name | 途径公交站点信息 | |||
| id | 公交站点编号 | |||
| location | 公交站点经纬度 |
| name | 入口名称 |
|---|---|
| location | 入口经纬度 |
| 名称 | 说明 | |
|---|---|---|
| id | 线路id编号 | |
| time | 该线路车段耗时 | |
| name | 线路名称 | |
| trip | 线路车次号 | |
| distance | 该item换乘段的行车总距离 | |
| type | 线路车次类型 | |
| departure_stop | 火车始发站信息 | |
| id | 上车站点ID | |
| name | 上车站点名称 | |
| location | 上车站点经纬度 | |
| adcode | 上车站点所在城市的adcode | |
| time | 上车点发车时间 | |
| start | 是否始发站,1表示为始发站,0表示非始发站 | |
| arrival_stop | 火车到站信息 | |
| id | 下车站点ID | |
| name | 下车站点名称 | |
| location | 下车站点经纬度 | |
| adcode | 下车站点所在城市的adcode | |
| time | 到站时间,如大于24:00,则表示跨天 | |
| end | 是否为终点站,1表示为终点站,0表示非终点站 | |
| via_stop | 途径站点信息,extensions=all时返回 | |
| name | 途径站点的名称 | |
| id | 途径站点的ID | |
| location | 途径站点的坐标点 | |
| time | 途径站点的进站时间,如大于24:00,则表示跨天 | |
| wait | 途径站点的停靠时间,单位:分钟 | |
| alters | 聚合的备选方案,extensions=all时返回 | |
| id | 备选方案ID | |
| name | 备选线路名称 | |
| spaces | 仓位及价格信息 | |
| code | 仓位编码 | |
| cost | 仓位费用 |
| 线路类型代码 | 公共交通工具备注 | 线路类型代码 | 公共交通工具备注 |
|---|---|---|---|
| 2010 | 普客火车 | 2015 | T字头的特快火车 |
| 2011 | G字头的高铁火车 | 2016 | K字头的快车火车 |
| 2012 | D字头的动车火车 | 2017 | L字头,Y字头的临时火车 |
| 2013 | C字头的城际火车 | 2018 | S字头的郊区线火车 |
| 2014 | Z字头的直达特快火车 |
| 仓位级别 | 仓位备注 | 仓位级别 | 仓位备注 |
|---|---|---|---|
| 0 | 不分仓位级别 | 20 | 火车高级软卧下铺 |
| 9 | 特等座 | 21 | 火车商务座 |
| 10 | 火车硬座 | 22 | 长途汽车座席 |
| 11 | 火车软座 | 23 | 长途汽车卧席上铺 |
| 12 | 火车软座1等座 | 24 | 长途汽车卧席中铺 |
| 13 | 火车软座2等座 | 25 | 长途汽车卧席下铺 |
| 14 | 火车硬卧上铺 | 30 | 飞机经济舱 |
| 15 | 火车硬卧中铺 | 31 | 飞机商务舱 |
| 16 | 火车硬卧下铺 | 40 | 客轮经济舱 |
| 17 | 火车软卧上铺 | 41 | 客轮3等舱 |
| 18 | 火车软卧下铺 | 42 | 客轮2等舱 |
| 19 | 火车高级软卧上铺 | 43 | 客轮豪华舱 |
curl --location --request GET 'https://restapi.amap.com/v3/direction/transit/integrated?parameters=&origin&destination&city&cityd&extensions=base&strategy=&nightflag=&date&time&sig&output=JSON&callback'{
"status": "1",
"info": "OK",
"infocode": "10000",
"count": "5",
"route": {
"origin": "116.481028,39.989643",
"destination": "116.434446,39.90816",
"distance": "14248",
"taxi_cost": "39",
"transits": [
{
"cost": "5.0",
"duration": "2695",
"nightflag": "0",
"walking_distance": "1326",
"distance": "14184",
"missed": "0",
"segments": [
{
"taxi": [],
"walking": {
"origin": "116.480888,39.989372",
"destination": "116.481880,39.984676",
"distance": "795",
"duration": "681",
"steps": [
{
"instruction": "步行16米左转",
"road": [],
"distance": "16",
"duration": [],
"polyline": "116.480888,39.989372;116.480904,39.989353;116.480888,39.989227",
"action": "左转",
"assistant_action": []
},
{
"instruction": "步行59米右转",
"road": [],
"distance": "59",
"duration": [],
"polyline": "116.480888,39.989223;116.480934,39.989201;116.480957,39.989185;116.481155,39.989059;116.481430,39.988880",
"action": "右转",
"assistant_action": []
},
{
"instruction": "步行202米右转",
"road": [],
"distance": "202",
"duration": [],
"polyline": "116.481430,39.988876;116.481377,39.988808;116.481308,39.988720;116.481270,39.988636;116.481201,39.988499;116.481194,39.988468;116.481163,39.988415;116.480080,39.987389",
"action": "右转",
"assistant_action": []
},
{
"instruction": "步行96米左转",
"road": [],
"distance": "96",
"duration": [],
"polyline": "116.480080,39.987381;116.479889,39.987400;116.479843,39.987408;116.479820,39.987423;116.479790,39.987442;116.479645,39.987556;116.479591,39.987583;116.479568,39.987587;116.479561,39.987587;116.479370,39.987408;116.479218,39.987278",
"action": "左转",
"assistant_action": []
},
{
"instruction": "步行29米右转",
"road": [],
"distance": "29",
"duration": [],
"polyline": "116.479218,39.987274;116.479301,39.987240;116.479362,39.987202;116.479385,39.987175;116.479477,39.987110",
"action": "右转",
"assistant_action": []
},
{
"instruction": "步行19米左转",
"road": [],
"distance": "19",
"duration": [],
"polyline": "116.479477,39.987106;116.479393,39.986946",
"action": "左转",
"assistant_action": []
},
{
"instruction": "步行100米向左后方行走",
"road": [],
"distance": "100",
"duration": [],
"polyline": "116.479393,39.986938;116.479607,39.986801;116.479897,39.986607;116.480019,39.986519;116.480064,39.986485;116.480293,39.986328",
"action": "向左后方行走",
"assistant_action": []
},
{
"instruction": "步行274米到达望京南",
"road"