Truck Calculations
Service Introduction
Order an eligible truck route plan based on the start and end coordinates.
Interface address
https://lbs.navinfo.com/open-api/truck/v1/route
Request method
GET
Request parameters
Please refer to the following table for the description of the request parameters for [Washer Road Service]:
Parameter | Type | Meaning | Required | Default | Remarks |
---|---|---|---|---|---|
ak | string | Developer Key | Yes | ||
guid | string | device id | No | ||
orig | string | Starting latitude and longitude | Yes | Example: 116.30815, 40.056878 | |
dest | string | End point latitude and longitude | Yes | Example: 116.30815,40.056878 | |
mid | string | path coordinate string | No | Format: lon1, lat1; lon2, lat2; ..., up to 12. Example: 116.314, 40.465; 116.352, 40.232; 116.453, 40.121 | |
inGb | string | original coordinate system | No | g02 | Default: g02 |
outGb | string | Target Coordinate System | No | g02 | Default: g02 |
policy | int | driving strategy | No | Default: 0 | |
num | int | Return the number of recommended routes | No | 1 | Value range: 1<=num<=3, default: 1 |
mr | int | Multi-rule multi-route | No | 0 | Whether a request is made, the path of 4 rules is obtained. 0: Disabled (default) |
size | int | Truck load type | No | 0 | 0: Judgment of condition for ignoring truck load type (default) |
length | int | Truck Length | No | Unit meters. The default value is 0, which means that the condition judgment of the vehicle length is ignored. | |
aweight | int | axle weight of the car | No | unit kilogram . The default value is 0, which means that the conditional judgment of the axis weight is ignored. | |
load | int | Total weight of the car | No | Including actual The weight of the cargo and the weight of the vehicle, in kilograms. The default value is 0, which means that the conditional judgment of the load is ignored. | |
weight | int | Truck's approved load | No | Approved load , the unit is kilograms. The default value is 0, which means that the conditional judgment of the approved load quality is ignored. | |
width | float | Truck width | No | Unit meters. The default value is 0, which means that the condition of the car width is ignored. | |
height | float | Truck height | No | Unit meters. The default value is 0, which means that the condition of the vehicle height is ignored. | |
axis | int | Number of axles of the car | No | Default A value of 0 indicates that the conditional judgment of the number of axes is ignored. | |
ttype | int | Truck Type | No | 0 (default Value), ignore truck type condition judgment | |
tfun | int | Truck Features | No | 0 (default), ignores the conditional judgment of the truck function. | |
etype | int | Energy Type | No | 0 (default), which means that the conditional judgment of the energy type is ignored. | |
es | int | Discharge Type | No | 0 (default) indicates the conditional judgment that ignores the emission type. | |
stime | string | departure time | No | Default: Current time | |
pnum | string | the license plate number used to determine whether or not to limit the line | No | Do not fill in the line limit issue, support 7 traditional license plates, such as "京******" |
Response data
For the description of the return parameters of the [Truck Calculation Service], please refer to the following table:
Return Value | Type | Meaning | Remarks | ||||
---|---|---|---|---|---|---|---|
status | int | Return status | Refer to the status code table for details. | ||||
msg | string | Return status description | Refer to the status code table for detail | ||||
data | object | Return to driving path planning Information | |||||
orig | string | starting point coordinates | |||||
dest | string | End Point Coordinates | |||||
total | int | Scenarios | |||||
routes | array | Drive and Transfer Set | |||||
rid | int | The first path planning scheme | |||||
dis | int | Travel Distance | Unit: Meter | ||||
dur | int | Expected line time | unit: second | ||||
rtoll | int | Toll Fees | Unit: Yuan | ||||
tlights | int | Number of traffic lights | |||||
nms | string | A set of road names that have passed by driving | The road names are separated by commas | ||||
restr | int | Limited If | 0: Represents that the line has been circumvented or unrestricted, that is, there is no road limit for the route. | ||||
steps | array | Driving route segmentation | |||||
sid | int | Several subsections | |||||
legid | int | Route point number | The waypoint number is an integer starting from 0, which is used to identify the waypoint segment to which the step belongs. For the road segment from the starting point to the first route, the legid is 0 | ||||
rinfo | string | Travel Description | For example: "向Drive southwest for 44 meters and turn right into the main road” | ||||
nm | string | Road Name | |||||
dis | int | This distance is | |||||
lonlats | string | This latitude and longitude string | The coordinate point string of this road segment, in the format, such as: 116.481247, 39.990704; 116.481270, 39.990726 | ||||
ttype | string | Travel Direction | Example: "turn right in the right, go straight", see steering action list | ||||
tmc | array | Segmented Traffic Details | |||||
status | int | road condition index | 0: no road condition; | ||||
dis | int | Length of this section | Unit: meter | ||||
ilonlat | string | The latitude and longitude of this section | is: x,y, value Divide the start and end index of the array by semicolon for lonlat, example: 1,7 | ||||
restrict | array | Limited information on the road segment | |||||
id | int | This road segment limit line number id | The first time it appears in the road segment, it will be described in detail. If the same rule appears again in other road segments, only id is used. | ||||
rtype | string | Road restriction type | 0: None | ||||
rdesc | string | Limited Line Description (Including restricted road sections or ranges, limited Line time, limited line model, text description) | For example: | ||||
pos | string | Display latitude and longitude | |||||
isrestr | int | Does the current vehicle violate this rule | 1: Violation | ||||
regid | int | Policy limit ID | Valid when rtype type is 12 or 13 | ||||
length | float | limit height or limit width | unit meters, Valid when rtype=3 or 4 | ||||
weight | float | Limited weight or limited axle weight | Unit ton, valid at type=5 or 6 |
Steering Action List:
Main Action List | |
---|---|
Go straight | Left |
Right turn | Left front |
Right front | Left rear |
Right rear | Keep left |
Keep right | Go straight and lean left |
Go straight and turn right | Left turn left and left |
Left turn and right | turn right and lean left |
turn right and lean right | Tune |
Service example