MultiThreadMatrixGetDistance Method |
Namespace: Telogis.GeoBase.Routing
//Create stops RouteStop stop_A = new RouteStop(33.83818, -117.90488); RouteStop stop_B = new RouteStop(33.82960, -117.90041); //Create new MultiThreadMatrix // * RouteStop array // * strategy -> RoutingStrategyFastest MultiThreadMatrix myMTM = new MultiThreadMatrix(new RouteStop[] {stop_A, stop_B }, new RoutingStrategyFastest()); //Get distance string sDist = ((myMTM.GetDistance(stop_A.Location, stop_B.Location)) / 1000).ToString("0.###"); //Output to console Console.WriteLine("Distance between stop_A and stop_B = " + sDist + Environment.NewLine);