騎行路線規(guī)劃
本文介紹通過(guò)阿里云OpenAPI SDK調(diào)用 周邊查詢-基礎(chǔ)API-騎行路線規(guī)劃 的方法以及參數(shù)說(shuō)明。
騎行路線規(guī)劃
根據(jù)起終點(diǎn)坐標(biāo)檢索符合條件的騎行路線規(guī)劃方案。
API定義
請(qǐng)求參數(shù)
參數(shù)名 | 含義及規(guī)則 | 是否必須 | 缺省值 | 參數(shù)樣例 |
originLongitude | 起點(diǎn)的經(jīng)度 | 必填 | 無(wú) | 117.466485 |
originLatitude | 起點(diǎn)的緯度 | 必填 | 無(wú) | 39.995197 |
destinationLongitude | 目的地的經(jīng)度 | 必填 | 無(wú) | 116.46424 |
destinationLatitude | 目的地的緯度 | 必填 | 無(wú) | 40.020642 |
響應(yīng)參數(shù)
參數(shù)名稱 | 類型 | 參數(shù)說(shuō)明 | ||||
success | bool | 接口調(diào)用是否成功 | ||||
errorCode | integer | 錯(cuò)誤碼 | ||||
errorMessage | string | 錯(cuò)誤信息 | ||||
data | object | 駕車(chē)路線對(duì)象 | ||||
originLongitude | string | 起點(diǎn)坐標(biāo)經(jīng)度 | ||||
originLatitude | string | 起點(diǎn)坐標(biāo)緯度 | ||||
destinationLongitude | string | 終點(diǎn)坐標(biāo)經(jīng)度 | ||||
destinationLatitude | string | 終點(diǎn)坐標(biāo)緯度 | ||||
taxiCost | string | 預(yù)計(jì)出租車(chē)費(fèi)用,單位:元 | ||||
count | string | 路徑規(guī)劃方案總數(shù) | ||||
paths | list | 路徑方案列表 | ||||
distanceMeter | string | 方案距離 | ||||
restriction | integer | 是否限行 | ||||
durationSecond | integer | 路線耗時(shí) | ||||
cost | object | 路徑時(shí)間及費(fèi)用成本 | ||||
durationSecond | string | 路線耗時(shí) | ||||
steps | list | 路徑步驟詳情 | ||||
instruction | string | 行駛指示 | ||||
orientation | string | 進(jìn)入道路方向 | ||||
roadName | string | 分段道路名稱 | ||||
stepDistanceMeter | string | 分段距離信息 | ||||
polyline | string | 分路段坐標(biāo)點(diǎn)串 | ||||
cost | object | 分段道路時(shí)間及費(fèi)用成本 | ||||
durationSecond | string | 路線耗時(shí) |
示例
響應(yīng)示例
{
"data": {
"originLatitude": "39.995197",
"originLongitude": "116.466485",
"paths": [
{
"cost": {},
"distanceMeter": "3920",
"steps": [
{
"orientation": "東北",
"cost": {
"durationSecond": "8"
},
"stepDistanceMeter": "24",
"instruction": "向東北騎行24米右轉(zhuǎn)",
"polyline": "116.466823,39.995556;116.46694,39.995556;116.46694,39.995556;116.46694,39.995621;116.46694,39.995621;116.46694,39.995686"
},
{
"orientation": "東",
"cost": {
"durationSecond": "30"
},
"stepDistanceMeter": "87",
"instruction": "向東騎行87米右轉(zhuǎn)",
"polyline": "116.46694,39.995686;116.467665,39.995686;116.467665,39.995686;116.467969,39.995686"
},
{
"orientation": "東南",
"cost": {
"durationSecond": "137"
},
"stepDistanceMeter": "398",
"instruction": "沿廣順北大街向東南騎行398米左轉(zhuǎn)",
"roadName": "廣順北大街",
"polyline": "116.467969,39.995686;116.467986,39.99533;116.467999,39.995213;116.467999,39.995213;116.467999,39.995165;116.468021,39.994978;116.468021,39.994978;116.468021,39.994939;116.468038,39.994883;116.468038,39.994883;116.468077,39.994731;116.468151,39.994518;116.468268,39.994301;116.468268,39.994301;116.468277,39.994271;116.468277,39.994271;116.468433,39.994023;116.468433,39.994023;116.468524,39.993893;116.468524,39.993893;116.468702,39.993702;116.468793,39.993615;116.468793,39.993615;116.468915,39.993511;116.469084,39.993368;116.469145,39.993325;116.469145,39.993325;116.469379,39.99316;116.469379,39.99316;116.469809,39.992865;116.469809,39.992865;116.470143,39.992656"
},
{
"cost": {
"durationSecond": "7"
},
"stepDistanceMeter": "20",
"instruction": "沿阜通西大街騎行20米左轉(zhuǎn)",
"roadName": "阜通西大街",
"polyline": "116.470143,39.992652;116.470304,39.992782"
},
{
"orientation": "北",
"cost": {
"durationSecond": "189"
},
"stepDistanceMeter": "552",
"instruction": "沿廣順北大街向北騎行552米右轉(zhuǎn)",
"roadName": "廣順北大街",
"polyline": "116.470304,39.992782;116.469957,39.993016;116.469957,39.993016;116.469666,39.993216;116.469666,39.993216;116.469271,39.993477;116.469102,39.993607;116.469102,39.993607;116.468898,39.993798;116.468746,39.99398;116.468628,39.994123;116.468585,39.994197;116.468585,39.994197;116.468477,39.994366;116.468424,39.994475;116.468307,39.99477;116.468264,39.994931;116.468242,39.995104;116.468212,39.995412;116.468212,39.995464;116.468212,39.995464;116.468203,39.995686;116.468186,39.995833;116.468186,39.995894;116.468186,39.995894;116.468181,39.996415;116.468173,39.996675;116.468155,39.996845;116.468155,39.996845;116.468121,39.997192"
},
{
"cost": {
"durationSecond": "3"
},
"stepDistanceMeter": "10",
"instruction": "沿宏昌路騎行10米左轉(zhuǎn)",
"roadName": "宏昌路",
"polyline": "116.468116,39.997192;116.468242,39.997201"
},
{
"cost": {
"durationSecond": "704"
},
"stepDistanceMeter": "2051",
"instruction": "沿廣順北大街騎行2051米直行",
"roadName": "廣順北大街",
"polyline": "116.468242,39.997201;116.468242,39.997274;116.468242,39.997274;116.468225,39.997543;116.468225,39.997543;116.468225,39.997769;116.468186,39.998641;116.468186,39.998641;116.468181,39.998811;116.468181,39.998811;116.468155,39.999214;116.468155,39.999214;116.468103,40.000308;116.468103,40.000308;116.468082,40.00079;116.468082,40.00079;116.468064,40.001272;116.468064,40.001272;116.468043,40.001636;116.468043,40.001636;116.468043,40.001727;116.468043,40.001727;116.468043,40.001918;116.468012,40.002613;116.468012,40.002613;116.468012,40.002687;116.468012,40.002687;116.468003,40.002938;116.468003,40.002938;116.46799,40.003281;116.46799,40.003281;116.467934,40.00428;116.467934,40.00428;116.467934,40.004414;116.467934,40.004414;116.467921,40.004809;116.467921,40.004944;116.467921,40.004944;116.467912,40.005026;116.467912,40.005026;116.467882,40.00605;116.467882,40.00605;116.467869,40.006172;116.46786,40.006341;116.46786,40.006341;116.467843,40.006567;116.467843,40.006567;116.467839,40.006827;116.467839,40.006827;116.467808,40.007365;116.467808,40.007365;116.467799,40.007517;116.467799,40.007517;116.467773,40.008047;116.467773,40.008047;116.46776,40.008589;116.46776,40.008589;116.46776,40.008702;116.46776,40.008702;116.467713,40.009701;116.467713,40.009701;116.4677,40.009983;116.4677,40.009983;116.467682,40.010174;116.467682,40.010174;116.467669,40.010451;116.467669,40.010451;116.467648,40.010881;116.467648,40.010881;116.46763,40.011207;116.46763,40.011207;116.467622,40.011467;116.467622,40.011467;116.467617,40.011602;116.467617,40.011602;116.467578,40.012348;116.467578,40.012348;116.467548,40.013134;116.467548,40.013134;116.46753,40.013477;116.46753,40.013477;116.467491,40.014266;116.467491,40.014266;116.467478,40.014874;116.467448,40.015295;116.467439,40.015812"
},
{
"cost": {
"durationSecond": "181"
},
"stepDistanceMeter": "528",
"instruction": "沿廣順北大街輔路騎行528米左轉(zhuǎn)",
"roadName": "廣順北大街輔路",
"polyline": "116.467435,40.015812;116.467435,40.015911;116.467435,40.015911;116.4674,40.016337;116.467378,40.016862;116.467378,40.01704;116.46737,40.017209;116.467357,40.017352;116.467357,40.017352;116.467339,40.017865;116.467339,40.017865;116.467326,40.018155;116.467326,40.018294;116.467326,40.018294;116.467309,40.018455;116.46727,40.019258;116.46727,40.019258;116.46727,40.019371;116.46727,40.019371;116.46727,40.019436;116.46727,40.019436;116.467248,40.01977;116.467248,40.01977;116.467209,40.020525;116.467209,40.020525;116.467209,40.020603"
},
{
"cost": {
"durationSecond": "86"
},
"stepDistanceMeter": "250",
"instruction": "沿來(lái)廣營(yíng)西路騎行250米到達(dá)目的地",
"roadName": "來(lái)廣營(yíng)西路",
"polyline": "116.467205,40.020603;116.467088,40.020603;116.467088,40.020603;116.466884,40.020603;116.466884,40.020603;116.466762,40.020603;116.466762,40.020603;116.46661,40.020603;116.466311,40.020603;116.466311,40.020603;116.465595,40.020621;116.465595,40.020621;116.465373,40.020629;116.465373,40.020629;116.464648,40.020642;116.464648,40.020642;116.464588,40.020647;116.464588,40.020647;116.46424,40.020642"
}
]
}
],
"count": "1",
"destinationLatitude": "40.020642",
"destinationLongitude": "116.46424"
},
"success": true
}