Location:

Batch Calculations

BatchRoute class

Based on the start and end points, the distance and time spent calculating the route in batches will not return detailed line information.

ConstructorDescription

nimap.service.BatchRoute(BatchRouteOptions)

Construct batch calculation objects, set object properties via BatchRouteOptions


BatchRouteOptionsTypeDescription

policy

Integer

Default: 0.
0: Default (road condition + time + mileage comprehensive consideration)
1: avoiding congestion
2: Do not take the high speed
3: High speed priority
4: Less fees
5: Avoiding congestion & not going high speed
6: Avoid congestion & high speed priority
7: Avoid congestion & avoid charges
8: Avoid congestion & avoid high speed & avoid charges
9: Do not take the high speed & avoid charges


MethodReturn ValueDescription

search(origin:lonlats:[],dest:lonlats:[],callback:function(result)) or search(points:Array.<Object>, Callback:function(result)

Implement a batch driving route query based on the starting point, end point coordinates or name. When the end point is latitude and longitude, search(origin:lonlats:[], dest:lonlats:[], 'callback:function(result))' starts with the name search(points:<Object>, 'callback:function( Result)', points is an object, for example: {origs:[{keyword: 'Beijing South Railway Station', city: 'Beijing'}, {keyword: 'Beijing West Railway Station', city: 'Beijing'}, Dests:[{keyword: 'WUDAOKOU', city: 'BEIJING'}, {keyword: 'LONGZE', city: 'BEIJING'}]}

setPolicy(policyOptions)

Set driving strategy, 0-9

TOP