private static void Match5x(Osrm5x osrm) { var locations = new Location[] { new Location(52.517037, 13.388860), new Location(52.529407, 13.397634), new Location(52.523219, 13.428555) }; var request = new Osrm.Client.Models.MatchRequest() { Coordinates = locations }; var result = osrm.Match(request); }
private async static Task Match5x(Osrm5x osrm) { var locations = new Location[] { new Location(52.517037, 13.388860), new Location(52.529407, 13.397634), new Location(52.523219, 13.428555) }; var request = new MatchRequest() { Coordinates = locations }; var result = await osrm.Match(request); }
public void Match_Response() { var locations = new Location[] { new Location(52.542648m, 13.393252m), new Location(52.543079m, 13.394780m), new Location(52.542107m, 13.397389m) }; var req = new MatchRequest() { Coordinates = locations, Timestamps = new int[] { 1424684612, 1424684616, 1424684620 } }; var result = osrm.Match(req).GetAwaiter().GetResult(); Assert.AreEqual <string>("Ok", result.Code); Assert.IsTrue(result.Matchings.Length > 0); Assert.IsTrue(result.Matchings[0].Legs.Length > 0); Assert.IsNotNull(result.Matchings[0].Confidence); }