/// <summary> /// /// </summary> /// <param name="locations"></param> /// <param name="vehicle"></param> /// <param name="pointsEncoded"></param> /// <param name="locale"></param> /// <param name="instructions"></param> /// <param name="elevation"></param> /// <param name="calcPoints"></param> /// <param name="pointHint"></param> /// <param name="chDisable"></param> /// <param name="weighting"></param> /// <param name="edgeTraversal"></param> /// <param name="algorithm"></param> /// <param name="heading"></param> /// <param name="headingPenalty"></param> /// <param name="passThrough"></param> /// <param name="roundTripDistance"></param> /// <param name="roundTripSeed"></param> /// <param name="alternativeRouteMaxPaths"></param> /// <param name="alternativeRouteMaxWeightFactor"></param> /// <param name="alternativeRouteMaxShareFactor"></param> /// <param name="avoid"></param> /// <param name="details"></param> /// <returns></returns> private RouteResponse CalculateRoute(IEnumerable <Location> locations, string vehicle = null, bool?pointsEncoded = true, string locale = null, bool?instructions = null, bool?elevation = null, bool?calcPoints = null, List <string> pointHint = null, bool?chDisable = null, string weighting = null, bool?edgeTraversal = null, string algorithm = null, int?heading = null, int?headingPenalty = null, bool?passThrough = null, int?roundTripDistance = null, long?roundTripSeed = null, int?alternativeRouteMaxPaths = null, int?alternativeRouteMaxWeightFactor = null, int?alternativeRouteMaxShareFactor = null, string avoid = null, string details = null) { try { var rtPoints = locations.Select(p => p.Lat + "," + p.Lon).ToList(); var response = _rtngApiInstance.RouteGet(rtPoints, pointsEncoded, _apiKey , locale, instructions, vehicle , elevation, calcPoints, pointHint , chDisable, weighting, edgeTraversal , algorithm, heading, headingPenalty , passThrough, roundTripDistance, roundTripSeed , alternativeRouteMaxPaths, alternativeRouteMaxWeightFactor , alternativeRouteMaxShareFactor, avoid, details); return(response); } catch (Exception ex) { throw; } }