Exemplo n.º 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());
        }
Exemplo n.º 2
0
        public static string GetOrsmObservableUrl(List <GeoCoordinate> coordinates)
        {
            IObservableUrlGenerator urlGenerator = new ProjectOsrmUrlGenerator()
            {
                Coordinates = coordinates
            };

            return(urlGenerator.GenerateFullUrl());
        }