Automobile Routing
DrivingRoute Class
Query driving route plan based on start and end points
| Constructor | Description | 
|---|---|
nimap.service.DrivingRoute(DrivingRouteOptions)  | 
| DrivingRouteOptions | Type | Description | 
|---|---|---|
policy  | String  | Default 0.  | 
adpy  | String  | Avoid the area. Supports 32 avoidance areas, each of which can have up to 16 vertices. The coordinate points are separated by ";", and the areas are separated by "|". If it is a quadrilateral, there are four coordinate points, and if it is a pentagon, there are five coordinate points; At the same time, the escape area is avoided and the road is avoided, and only the avoidance road is supported; The avoidance area cannot exceed 81 square kilometers, otherwise the avoidance area will be invalid.  | 
num  | String  | Return the number of routes, the range is 1-3, the default is 1  | 
pnum  | String  | Do not fill in the limit line issue, support normal plate which has 7 digits, such as "京 *******"  | 
adroad  | String  | Avoiding roads, multiple roads are separated by ";", for example: "Beiqing Road; Yongfeng Road"  | 
panel  | String|HTMLElement  | The HTML container id or container element of the navigation result list. After this parameter is supplied, the result list will be in this container. Show it. Optional  | 
map  | Map  |   nimap.Map object, a map instance showing the results. When this parameter is specified, the location annotations for the search results are automatically added to this map. Optional  | 
| Method | Return Value | Description | 
|---|---|---|
search(orig:lonlat,dest:lonlat,function(result)) or search(points<Array>,function(result)) or search(orig:lonlat,dest:lonlat,midPoints =<Object>,callback:function(result)  | Base route planning based on starting point and end point coordinates. When the end point is latitude and longitude, search(origin:lonlat, dest:lonlat, callback:function(result)) starts from the name. search(points<Array>, callback: function(result)) points is an Array, the first and last are From the end point, the middle is the waypoint, for example: [{keyword: 'Beijing South Railway Station', city: 'Beijing'}, {keyword: 'Beijing West Railway Station', city: 'Beijing'}]] For latitude and longitude search(orig:lonlat,dest:lonlat,midPoints=<Object>,callback:function(result)) For example: midPoints={midPoints:"116.21,39.21;117.12,39.21"}  | |
setPolicy()  | Set driving strategy  | |
setAv oidRoad()  | Set the avoidance road  | |
setAvoidPolygon()  | Set the avoidance area  | |
setLicencePlateNumber()  | Set the license plate number  | |
clear()  | Clear navigation results  | 
