C# code for point to point routing sample

C# code for point to point routing sample

public static NodePaths PtoPWithVIA(Tasker server, Storage st, double startX, double startY,
                                        double stopX, double stopY, double[] viaPointsX, double[] viaPointsY)
{
    // Create a Router class using default accuracy and routing over time, and calculate the route
    Router router = new Router(server, Environment.ProcessorCount, st, CostType.Time);
    NodePaths route = router.RouteVIA(startX, startY, stopX, stopY, viaPointsX, viaPointsY, TSP.TSPType.StartToStop, true);
    return route;
}
Select all code
Close
Copyright © 2012 Xtreme Route - All Rights Reserved. Contact us: