2/location/line/drive route/en
location/line/drive_route
Return self driving route information by starting point and terminal point.
URL
https://api.weibo.com/2/location/line/drive_route.json
Supported Formats
JSON
HTTP Request Method
GET
Requires Login
true
See the Login and Authorization Mechanism Statement for login and authorization details.
Requests Count Limitation
Level:Normal
Count Limitation:true
See the Interface Access Rights Statement for the request count limitation details.
Request Parameters
Requires | Type and Range | Description | |
---|---|---|---|
source | false | string | This parameter is not needed when using OAuth.The value of this parameter is the AppKey. |
access_token | false | string | This parameter is required when using OAuth.You will get the access_token after oauth authorization. |
begin_pid | false | string | POI ID of starting point.Parameter 'begin_pid' or parameter 'begin_coordinate' must be provided.'begin_pid' is priority selection. |
begin_coordinate | false | string | Coordinate of starting point.Longitude and latitude are separated by comma.Parameter 'begin_pid' or parameter 'begin_coordinate' must be provided.'begin_pid' is priority selection. |
end_pid | false | string | POI ID of terminal point.Parameter 'end_pid' or parameter 'end_coordinate' must be provided.'end_pid' is priority selection. |
end_coordinate | false | string | Coordinate of terminal point.Longitude and latitude are separated by comma.Parameter 'end_pid' or parameter 'end_coordinate' must be provided.'end_pid' is priority selection. |
type | false | int | Return the datas by the type.0:Speed priority; 1:Cost priority; 2:Distance priority; Default is 0. |
Notes
None
Response
JSON Example
{ "type": "0", "road_number": "2", "distance": "16601", "drive_time": "36", "drive_coordinates": "116.22106,39.90652|116.22106,39.90594", "pass_coordinates": "", "begin_coordinate": "116.22106,39.90652", "end_coordinate": "116.27505,40.00236", "extension_info": "0", "roads": [ { "rid": "1", "road_name": "银河大街", "coordinates": "116.22106,39.90652|116.22106,39.90594", "begin_coordinate": "116.22106,39.90652", "end_coordinate": "116.22106,39.90594", "road_length": "64", "road_sign": "行驶时间;等级方向;坐标点;道路名称;", "action": "右转", "run_time": "1", "grade": "主要道路", "direction": "南", "assist_info": "", "navigation_tag": "" }, ... ] }
See the Error Code Description for the error information details.
Field Description
None
Others
None
文档更新时间: 2012-01-30