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.
Constructor | Description |
---|---|
nimap.service.BatchRoute(BatchRouteOptions) | Construct batch calculation objects, set object properties via BatchRouteOptions |
BatchRouteOptions | Type | Description |
---|---|---|
policy | Integer | Default: 0. |
Method | Return Value | Description |
---|---|---|
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 |