Пример #1
0
        private static void Match4x(OsrmClient osrm)
        {
            var locations = new LocationWithTimestamp[] {
                new LocationWithTimestamp(52.542648, 13.393252, 1424684612),
                new LocationWithTimestamp(52.543079, 13.394780, 1424684616),
                new LocationWithTimestamp(52.542107, 13.397389, 1424684620)
            };

            var request = new MatchRequest()
            {
                Locations    = locations,
                Instructions = true,
                Classify     = true
            };

            var result = osrm.Match(request);
        }
Пример #2
0
        public void Match_Response()
        {
            var locations = new LocationWithTimestamp[] {
                new LocationWithTimestamp(52.542648, 13.393252, 1424684612),
                new LocationWithTimestamp(52.543079, 13.394780, 1424684616),
                new LocationWithTimestamp(52.542107, 13.397389, 1424684620)
            };

            var request = new MatchRequest()
            {
                Locations    = locations,
                Instructions = true,
                Classify     = true
            };

            var result = osrm.Match(request);

            CheckStatus200(result);
            Assert.IsTrue(result.Matchings.Length > 0);
            Assert.IsTrue(result.Matchings[0].Instructions.Length > 0);
            Assert.IsNotNull(result.Matchings[0].Confidence);
        }