Parameters and representation class route. Representation includes a report of the route divided into sections (sections) designated by the waypoints.
EMAPI. | Parameters and representation class route. |
Properties | |
routeFrom | {String} Location of the starting point of the route. |
routeTo | {String} Location of the ending point of the route. |
routeDescription | {String} The name of the route. |
routeItems | {EMAPI.ArrayObjects} List of segments of the route between pairs of another points. |
tollRoadLength | {Float} Length of toll roads are included in the route (in km). |
tollRoadTime | {String} The time of travel by toll roads is included in the route. |
totalFuelCost | {Float} Total cost of fuel. |
totalRouteCost | {Float} The total cost of the route. |
totalRouteLength | {Float} The total length of the route (in km). |
totalRouteTime | {String} Total time of passing route. |
unreachableEntry | {Integer} The index of the first point from the route points, which couldn’t be determined the access (from the 1 for the second point of the route). |
Functions | |
EMAPI. | The constructor of a new instance of EMAPI.Router.RouteRepresentation class. |
destroy | Destroys object of EMAPI.Router.RouteRepresentation class. |
{EMAPI.ArrayObjects} List of segments of the route between pairs of another points. There are 1 less than the number of waypoints. There is an array of EMAPI.Router.RouteRepresentationSection class managed by an object of EMAPI.ArrayObjects class.
{Integer} The index of the first point from the route points, which couldn’t be determined the access (from the 1 for the second point of the route). This field is relevant only if the return result of the function EMAPI.Router.calculateRoute is not 0.
Destroys object of EMAPI.Router.RouteRepresentation class.
destroy: function()
Calculates a route between points placed in the list of wayPoints after the selected vehicle, driver and routing parameters.
calculateRoute: function( vehicle, driver, roadType, routeOptions, callback, force )