Skip to content

Instantly share code, notes, and snippets.

@maplinkapi
Created May 8, 2013 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maplinkapi/5541442 to your computer and use it in GitHub Desktop.
Save maplinkapi/5541442 to your computer and use it in GitHub Desktop.
var routeManager = new MRouteMannager(map);
routeManager.createRoute(routeStops, routeOptions, null, function (response) {
function getRouteTotals(routeTotalsResponse) {
var routeTotals = "[RouteTotals]";
routeTotals += "<br/>";
routeTotals += "totalDistance: " + routeTotalsResponse.totalDistance;
routeTotals += ", totalTime: " + routeTotalsResponse.totalTime;
routeTotals += ", totalFuelUsed: " + routeTotalsResponse.totalFuelUsed;
routeTotals += ", totaltollFeeCost: " + routeTotalsResponse.totaltollFeeCost;
routeTotals += ", totalFuelUsed: " + routeTotalsResponse.totalFuelUsed;
routeTotals += ", totalCost: " + routeTotalsResponse.totalCost;
routeTotals += ", taxiFare1: " + routeTotalsResponse.taxiFare1;
routeTotals += ", taxiFare2: " + routeTotalsResponse.taxiFare2;
routeTotals += "<br/><br/>";
return routeTotals;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment