예제 #1
0
        public PetResponseModel FindPetByName(PetModel pet)
        {
            var myLocation = new GeoCoordinate(52.0907, 5.1214);
            //GeoCoordinate Source = new GeoCoordinate(40.7486, 5.4253);
            //GeoCoordinate Destination = new GeoCoordinate(58.3838, 3.01412);
            //double Distance = myLocation.DistanceTo(pet.LastKnownLocation, DistanceType.KILOMETERS);

            var returnPet = new PetResponseModel()
            {
                Name            = pet.Name,
                CurrentLocation = pet.LastKnownLocation,
                Distance        = myLocation.DistanceTo(pet.LastKnownLocation, DistanceType.KILOMETERS),
            };

            return(returnPet);
        }
예제 #2
0
 public string AlertResponseTeam(PetResponseModel pet)
 {
     return($"Alert send to PetFinder response team. En route to location: {pet.CurrentLocation.Latitude}.{pet.CurrentLocation.Longitude} ETA: {pet.CurrentLocation.Latitude.Minutes} minutes");
 }