Bus Routing
BusRoute class
Query the bus transfer service based on the start and end points
Constructor | Description |
---|---|
nimap.service.BusRoute(BusRouteOptions) |
BusRouteOptions | Type | Description |
---|---|---|
policy | Integer | Default: 1. |
city | String | Required, search for the city (name/adcode), example "Beijing" or "110000" |
Method | Return Value | Description |
---|---|---|
search(orig:lonlat,dest:lonlat,function(result)) or search(points<Array>,function(result)) | Query the bus route based on the starting point, end point coordinates or name. When the starting point is latitude and longitude, search(origin:lonlat, dest:lonlat, callback:function(result)) starts with the name search(points<Array>, callback:function(result)points is an Array, for example: [{ Keyword: 'Beijing South Railway Station', city: 'Beijing'}, {keyword: 'Beijing West Railway Station', city: 'Beijing'}]] |