百度地图 API
使用准备
服务状态码
地点
地点检索及联想
地理编码
全球逆地理编码
坐标转换
地址解析聚合
城乡类型判别
时区
推荐上车点
路线
服务概览
轻量级路线规划
GET
骑行路线规划
GET
步行路线规划
GET
公交路线规划
GET
货车路线规划
GET
批量算路
物流路⽹计算
货车路线规划已发布
GET/logistics_direction/v1/truck?origin=22.673186,114.065699&destination=22.6721,114.068886&height=1.8&width=1.9&weight=2.5&length=4.2&axle_weight=2&axle_count=2&is_trailer=0&plate_color=0&ak=你的AK
创建时间: 2025-06-02 21:09
请求参数
Query 参数
参数名示例值是否必填参数类型描述说明
origin22.673186,114.065699string起点坐标 格式为:纬度,经度。如:21.22345,112.11478
destination22.6721,114.068886string终点坐标 格式与起点坐标相同
height1.8string车辆高度 单位:米,取值[0, 10.0],默认1.8,会按照填写数字进行限行规避
width1.9string车辆宽度 单位:米,取值[0, 10.0],默认1.9,会按照填写数字进行限行规避
weight2.5string车辆总重 车辆总重=车辆自身重量+货物重量,单位:吨,取值[0,100],默认2.5,会按照填写数字进行限行规避
length4.2string车辆长度 单位:米,取值[0, 25.0],默认4.2,会按照填写数字进行限行规避
axle_weight2string轴重 单位:吨,取值[0,50],默认2,会按照填写数字进行限行规避
axle_count2string轴数 取值[0,50],默认2,会按照填写数字进行限行规避
is_trailer0string是否是挂车 0:不是(默认) 1:是
plate_color0string车牌颜色 0:蓝色(默认) 1:黄 2:黑 3:白 4:绿
ak你的AKstring用户的AK,授权使用
响应示例
成功
HTTP状态码:200
内容格式:JSON
数据结构
statusinteger
必填
messagestring
必填
resultobject
必填
restrictionobject
必填
typestring
必填
infostring
必填
totalinteger
必填
routesarray<object>
必填
originobject
可选
lngnumber
必填
latnumber
必填
destinationobject
可选
lngnumber
必填
latnumber
必填
tagstring
可选
distanceinteger
可选
durationinteger
可选
stepsarray<object>
可选
leg_indexinteger
必填
directioninteger
必填
distanceinteger
必填
road_namestring
必填
road_typeinteger
必填
start_locationobject
必填
lngnumber
必填
latnumber
必填
end_locationobject
必填
lngnumber
必填
latnumber
必填
pathstring
必填
traffic_conditionarray<object>
必填
statusinteger
必填
geo_cntinteger
必填
distanceinteger
必填
restrictionsarray<object>
必填
durationinteger
必填
adcodesstring
必填
oil_costnumber
可选
track_idxinteger
可选
unavoid_polygons_idxstring
可选
traffic_light_numinteger
可选
routesinfo_extstring
必填
响应示例
{
  "status": 0,
  "message": "ok",
  "result": {
    "restriction": { "type": "0", "info": "" },
    "total": 1,
    "routes": [
      {
        "origin": {
          "lng": 114.06571601088974,
          "lat": 22.67317578337568
        },
        "destination": {
          "lng": 114.06883474382559,
          "lat": 22.672117710702736
        },
        "tag": "默认",
        "distance": 880,
        "duration": 450,
        "steps": [
          {
            "leg_index": 0,
            "direction": 7,
            "distance": 268,
            "road_name": "清祥路",
            "road_type": 4,
            "start_location": {
              "lng": 114.06571601088974,
              "lat": 22.67317578337568
            },
            "end_location": {
              "lng": 114.06498411443144,
              "lat": 22.67095626741058
            },
            "path": "114.065716,22.6731758;114.065506,22.6726359;114.065435,22.6724659;114.065385,22.672326;114.065235,22.6718961;114.065225,22.6718661;114.065175,22.6717461;114.065034,22.6713463;114.064934,22.6711064;114.064894,22.6709864;114.064984,22.6709563",
            "traffic_condition": [
              {
                "status": 1,
                "geo_cnt": 8,
                "distance": 245
              },
              {
                "status": 2,
                "geo_cnt": 2,
                "distance": 23
              }
            ],
            "restrictions": [ {} ],
            "duration": 279,
            "adcodes": "440309,440307"
          },
          {
            "leg_index": 0,
            "direction": 4,
            "distance": 187,
            "road_name": "环城路",
            "road_type": 3,
            "start_location": {
              "lng": 114.06498411443144,
              "lat": 22.67095626741058
            },
            "end_location": {
              "lng": 114.06647375599361,
              "lat": 22.67014499432073
            },
            "path": "114.064984,22.6709563;114.065264,22.6708159;114.065964,22.6704152;114.066284,22.670165;114.066414,22.670075;114.066474,22.670145",
            "traffic_condition": [
              {
                "status": 2,
                "geo_cnt": 5,
                "distance": 187
              }
            ],
            "restrictions": [ {} ],
            "duration": 104,
            "adcodes": "440307"
          },
          {
            "leg_index": 0,
            "direction": 1,
            "distance": 268,
            "road_name": "五和大道",
            "road_type": 3,
            "start_location": {
              "lng": 114.06647375599361,
              "lat": 22.67014499432073
            },
            "end_location": {
              "lng": 114.06812492008547,
              "lat": 22.672016417426942
            },
            "path": "114.066474,22.670145;114.066664,22.670365;114.067394,22.6712055;114.068095,22.6719964;114.068125,22.6720164",
            "traffic_condition": [
              {
                "status": 1,
                "geo_cnt": 4,
                "distance": 268
              }
            ],
            "restrictions": [ {} ],
            "duration": 36,
            "adcodes": "440307"
          },
          {
            "leg_index": 0,
            "direction": 4,
            "distance": 112,
            "road_name": "",
            "road_type": 6,
            "start_location": {
              "lng": 114.06812492008547,
              "lat": 22.672016417426942
            },
            "end_location": {
              "lng": 114.06910443577772,
              "lat": 22.671878283021133
            },
            "path": "114.068125,22.6720164;114.068215,22.6719865;114.068974,22.671758;114.069104,22.6718783",
            "traffic_condition": [
              {
                "status": 0,
                "geo_cnt": 3,
                "distance": 112
              }
            ],
            "restrictions": [ {} ],
            "duration": 16,
            "adcodes": "440307"
          },
          {
            "leg_index": 0,
            "direction": 11,
            "distance": 45,
            "road_name": "",
            "road_type": 6,
            "start_location": {
              "lng": 114.06910443577772,
              "lat": 22.671878283021133
            },
            "end_location": {
              "lng": 114.06883474382559,
              "lat": 22.672117710702736
            },
            "path": "114.069104,22.6718783;114.068875,22.6720178;114.068815,22.6720877;114.068835,22.6721177",
            "traffic_condition": [
              {
                "status": 0,
                "geo_cnt": 3,
                "distance": 45
              }
            ],
            "restrictions": [ {} ],
            "duration": 6,
            "adcodes": "440307"
          }
        ],
        "oil_cost": 0.46,
        "track_idx": -1,
        "unavoid_polygons_idx": "",
        "traffic_light_num": 2
      }
    ],
    "routesinfo_ext": "eyJzZXNzaW9uX2lkIjoiIiwibG9jIjoibmoiLCJ0cmFja3B0c19kaXN0YW5jZXMiOls4ODBdfQ"
  }
}
最后更新: -