예제 #1
0
        public async Task<GPSInformation> GetLocationAsync()
        {
            var tmpLocation = new GPSInformation();
            LocationManagerService.RequestWhenInUseAuthorization();
            LocationManagerService.StartUpdatingLocation();
            LocationManagerService.StartUpdatingHeading();
            LocationManagerService.LocationsUpdated += (c, r) =>
            {
                tmpLocation = new GPSInformation() { Latitude = r.Locations[0].Coordinate.Latitude, Longitude = r.Locations[0].Coordinate.Longitude };
            };

            while (tmpLocation == null)
                await Task.Delay(1);

            return tmpLocation;
        }
예제 #2
0
파일: NaneCore.cs 프로젝트: SezginEge/Nane
 public async Task<IEnumerable<ArtistView>> GetNearestArtists(GPSInformation _location)
 {
     return await _coreService.PostToAPI<List<ArtistView>>("location/NearestGroups",_location);
 }