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; }
public async Task<IEnumerable<ArtistView>> GetNearestArtists(GPSInformation _location) { return await _coreService.PostToAPI<List<ArtistView>>("location/NearestGroups",_location); }