Пример #1
0
        public static string GetOrsmObservableUrlForFineCoordinates(IRouteRequester requester)
        {
            List <GeoCoordinate> fineCoordinates = new List <GeoCoordinate>();

            foreach (RouteInfoLeg leg in requester.RequestedResponse.Routes[0].Legs)
            {
                foreach (RouteInfoStep step in leg.Steps)
                {
                    foreach (RouteInfoIntersection intersection in step.Intersections)
                    {
                        fineCoordinates.Add(intersection.Coordinate);
                    }
                }
            }

            IObservableUrlGenerator urlGenerator = new ProjectOsrmUrlGenerator()
            {
                Coordinates       = fineCoordinates,
                Zoom              = 8,
                LanguageString    = "en",
                AlternativeRoutes = false
            };

            return(urlGenerator.GenerateFullUrl());
        }
 private void ButtonB_Click(object sender, RoutedEventArgs e)
 {
     _requester          = TestingFunctions.RequestARoute(_cleanedCoordinates);
     CheckBoxB.IsChecked = _requester.RequestSuccessful;
 }