Bus Routing
Service Introduction
Plan a qualified bus interchange route plan based on the start and end coordinates.
Interface address
https://lbs.navinfo.com/open-api/gtp/v1/bus
Request method
GET
Request parameters
The bus calculations are described in the table below:
| Parameter | Type | Meaning | Required | Default | Remarks | 
|---|---|---|---|---|---|
| ak | string | Developer Key | Yes | If there is no key, please apply | |
| 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 | |
| city | string | city name | Yes | ||
| inGb | string | original coordinate system | No | g02 | Default g02 | 
| outGb | string | target coordinate system | No | g02 | Default g02 | 
| policy | int | Public Exchange Strategy | No | 1 | Default: 1 | 
| stime | string | Departure Time | No | Current time | Time format: HH:mm (24-hour clock) , for example: 12:00 | 
Response data
| Return Value | Type | Meaning | Remarks | |||
|---|---|---|---|---|---|---|
| status | int | Return status | See status code table for details | |||
| msg | string | Back to status description | See status code table for details | |||
| data | object | return results | ||||
| orig | string | starting point coordinates | ||||
| dest | string | Endpoint coordinates | ||||
| total | int | scheme Number | ||||
| routes | array | Communication Scheme Set | ||||
| rid | string | The first public transfer scheme | ||||
| wdis | int | Total walking distance | Unit: m | |||
| detail | string | Overall description | ||||
| dis | int | distance | unit: m | |||
| dur | int | Expected line time | Unit: second | |||
| transfer | int | The number of line transfers | ||||
| total | int | The total number of stations in the line | ||||
| steps | array | This route is segmented | ||||
| sid | string | Several subsections | ||||
| dis | int | The distance of this section | Unit: m | |||
| dur | int | This time interval | unit: second | |||
| lonlats | string | This road segment coordinate point string | Format is a coordinate string, such as:116.481247,39.990704;116.481270,39.990726 | |||
| type | string | Traffic Mode | Current support: walking, bus, subway | |||
| detail | object | Specific field information for transportation methods | ||||
Walk: detail field format when type=1 (walking)
| Return Value | Type | Meaning | Remarks | 
|---|---|---|---|
| rinfo | string | Walk Description | Example: Go west along the North Fourth Ring Road East Road; reach the destination | 
| dir | string | Walking Direction | Example: West | 
Broadway or subway: detail field format when type=2 or 3 (bus or subway)
| Return Value | Type | Meaning | Remarks | 
|---|---|---|---|
| nm | string | route name | Example: Go west along the North Fourth Ring Road East Road; reach the destination | 
| sstation | string | Name of the station on the route | Example: Life Science Park Station Entry: B3 | 
| estation | string | Name of the station under the route | Example: Exit of North Shaotong Station: | 
| wtime | int | waiting time | |
| isnight | string | whether It is a night shift | |
| isdri | string | is running | |
| dtime | int | The first and last time of the line | |
| mline | string | Merge line names | separation separated | 
| stations | int | Number of sites on this line | |
| Snames | string | The name of the site passed | 
Service example
