Location:

Bus Routing

BusRoute class

Query the bus transfer service based on the start and end points

ConstructorDescription

nimap.service.BusRoute(BusRouteOptions)


BusRouteOptionsTypeDescription

policy

Integer

Default: 1.
1: fastest arrival
2: Least transfer
3: Least walking
4: Only take the bus
5: Just take the subway

city

String

Required, search for the city (name/adcode), example "Beijing" or "110000"


MethodReturn ValueDescription

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'}]]

TOP