0
나는 가장 가까운 10 개의 상점 위치를 모아서 근접한 순서로 표시하기로되어있는 PFQueryTableView를 가지고 있습니다. 나는있는 tableview과 같이 조회 : 위의 코드는 잘 작동위치 Query in Parse TableView
- (PFQuery *)queryForTable {
PFQuery *query = [PFQuery queryWithClassName:@"TopToday"];
query.limit = 7;
CLLocation *currentLocation = locationManager.location;
PFGeoPoint *userLocation =
[PFGeoPoint geoPointWithLatitude:currentLocation.coordinate.latitude
longitude:currentLocation.coordinate.longitude];
return query;
}
, 단지 특별한 순서없이 7 개 임의의 위치를 수집합니다. 그러나이 줄을 추가 할 때 :
[query whereKey:@"location" nearGeoPoint:userLocation withinMiles:50];
그냥 빈 기본 tableview를 반환합니다. 누구든지 쿼리가 위치 행과 함께 작동하지 않는 이유가 무엇입니까?
지리적으로 'userLocation'은 실제로 테스트 할 때 어디에 있는지 확인해 보셨습니까? 그 지역의 50 마일 이내에 위치가있는 'TopToday' 기록이 있습니까? –