骑行路线规划

更新时间:

本文介绍通过阿里云OpenAPI SDK调用 周边查询-基础API-骑行路线规划 的方法以及参数说明。

骑行路线规划

根据起终点坐标检索符合条件的骑行路线规划方案。

API定义

请求参数

参数名

含义及规则

是否必须

缺省值

参数样例

originLongitude

起点的经度

必填

117.466485

originLatitude

起点的纬度

必填

39.995197

destinationLongitude

目的地的经度

必填

116.46424

destinationLatitude

目的地的纬度

必填

40.020642

响应参数

参数名称

类型

参数说明

success

bool

接口调用是否成功

errorCode

integer

错误码

errorMessage

string

错误信息

data

object

驾车路线对象

originLongitude

string

起点坐标经度

originLatitude

string

起点坐标纬度

destinationLongitude

string

终点坐标经度

destinationLatitude

string

终点坐标纬度

taxiCost

string

预计出租车费用,单位:元

count

string

路径规划方案总数

paths

list

路径方案列表

distanceMeter

string

方案距离

restriction

integer

是否限行

durationSecond

integer

路线耗时

cost

object

路径时间及费用成本

durationSecond

string

路线耗时

steps

list

路径步骤详情

instruction

string

行驶指示

orientation

string

进入道路方向

roadName

string

分段道路名称

stepDistanceMeter

string

分段距离信息

polyline

string

分路段坐标点串

cost

object

分段道路时间及费用成本

durationSecond

string

路线耗时

示例

响应示例

{
  "data": {
    "originLatitude": "39.995197",
    "originLongitude": "116.466485",
    "paths": [
      {
        "cost": {},
        "distanceMeter": "3920",
        "steps": [
          {
            "orientation": "东北",
            "cost": {
              "durationSecond": "8"
            },
            "stepDistanceMeter": "24",
            "instruction": "向东北骑行24米右转",
            "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米右转",
            "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米左转",
            "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米左转",
            "roadName": "阜通西大街",
            "polyline": "116.470143,39.992652;116.470304,39.992782"
          },
          {
            "orientation": "北",
            "cost": {
              "durationSecond": "189"
            },
            "stepDistanceMeter": "552",
            "instruction": "沿广顺北大街向北骑行552米右转",
            "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米左转",
            "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米左转",
            "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": "沿来广营西路骑行250米到达目的地",
            "roadName": "来广营西路",
            "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
}