public async Task <Models.Location> GetLocationFromSystem(Models.Location CurrentLocation) { Xamarin.Essentials.Location Loc = await Geolocation.GetLastKnownLocationAsync(); CurrentLocation.lat = Loc.Latitude; CurrentLocation.lon = Loc.Longitude; return(CurrentLocation); }
public Location GetCurrentLocationAsync() { Models.Location CurrentLocation = new Models.Location(); GetLocationFromSystem(CurrentLocation); return(CurrentLocation); }