コード例 #1
0
        public RoutePlan GetRoutePlan(IEnumerable<int> addressesIds, int destinationId)
        {
            //Get Account Settings
            var carPlan = _carPlanner.GetCarPlan(new CarPlanParameters()
                                                    {
                                                        PickupCount = addressesIds.Count(),
                                                        MaxCarCapacity = 3,
                                                        MinCarCapacity = 2
                                                    });

            var internalRoutePlan = _routePlanner.GetRoutePlan(addressesIds,destinationId, carPlan);

            RoutePlan plan = new RoutePlan();
            Route route;
            foreach (var iroute in internalRoutePlan.Routes)
            {
                route = _mapper.Map(iroute.Route);
                plan.Routes.Add(new RouteDetails()
                {
                    Route = route,
                    Url = _urlProvider.GetRouteUrl(route)
                });
            }

            return plan;

        }
コード例 #2
0
        public RoutePlan GetRoutePlan(IEnumerable <int> addressesIds, int destinationId)
        {
            //Get Account Settings
            var carPlan = _carPlanner.GetCarPlan(new CarPlanParameters()
            {
                PickupCount    = addressesIds.Count(),
                MaxCarCapacity = 3,
                MinCarCapacity = 2
            });

            var internalRoutePlan = _routePlanner.GetRoutePlan(addressesIds, destinationId, carPlan);

            RoutePlan plan = new RoutePlan();
            Route     route;

            foreach (var iroute in internalRoutePlan.Routes)
            {
                route = _mapper.Map(iroute.Route);
                plan.Routes.Add(new RouteDetails()
                {
                    Route = route,
                    Url   = _urlProvider.GetRouteUrl(route)
                });
            }

            return(plan);
        }