private List <double> AddedDistancesBetweenTwoPlacesForFirstPackage(CourierLocationsAlongTheWay currentCuriersLocation, LocationCoordinates firstPackageSender, LocationCoordinates firstPackageRecipient) { var vehicleRangeWithPackage = new List <double>(); vehicleRangeWithPackage.Add(_locationService.GetDistanceBetweenTwoPlaces(currentCuriersLocation.StartingPlace, firstPackageSender)); vehicleRangeWithPackage.Add(_locationService.GetDistanceBetweenTwoPlaces(firstPackageSender, firstPackageRecipient)); vehicleRangeWithPackage.Add(_locationService.GetDistanceBetweenTwoPlaces(firstPackageRecipient, currentCuriersLocation.StartingPlace)); return(vehicleRangeWithPackage); }
private Dictionary <int, CourierLocationsAlongTheWay> GetAllCouriersLocationCoordinates() { var courierLocationAlongTheWay = new Dictionary <int, CourierLocationsAlongTheWay>(); var couriers = _userService.GetAllDrivers(); foreach (var courier in couriers) { var courierLocations = new CourierLocationsAlongTheWay() { StartingPlace = new LocationCoordinates { Lat = courier.lat, Lon = courier.lon }, }; courierLocationAlongTheWay.Add(courier.Id, courierLocations); } return(courierLocationAlongTheWay); }