예제 #1
0
        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);
        }
예제 #2
0
        public Location GetCurrentLocationAsync()

        {
            Models.Location CurrentLocation = new Models.Location();
            GetLocationFromSystem(CurrentLocation);


            return(CurrentLocation);
        }