EV Routing
EvTrip Class
Train calculation, driving range service.
| Constructor | Description | 
|---|---|
| nimap.service.EvTrip(EvTripOptions) | 
| EvTripOptions | Type | Description | 
|---|---|---|
| policy | String | Default 0. | 
| soc | String | Required, current remaining power, in kilowatts | 
| ca | String | Required, the amount of power to be charged, in kilowatts | 
| adpyTd> | String | The avoidance 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 7 traditional license plates, Such as "Beijing ****" | 
| adroad | String | Avoiding roads, multiple roads are divided by ";", for example: "Beiqing Road; Yongfeng Road" | 
| routePanel | 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 | 
| poiPanel | String|HTMLElement | The HTML container id or container element of the charging pile search result list. After this parameter is supplied, the result list will be displayed in this container. 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 | 
|---|---|---|
| drive(orig:lonlat,dest:lonlat,function(result)) or drive(points<Array>,function(result)) | Query driving directions based on remaining battery capacity, desired charge to charge, and start 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'}]> | |
| evRange(location:lonlat,function(result)) | based on remaining battery capacity, current location , draw the range that can be driven. | |
| setQuery(EvTripOptions) | Set the query parameters, same as EvTripOptions. | |
| clear() | Clear the annotations and results displayed on the map. | 
