CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(27.941761 , -82.171537);
MKReverseGeocoder *reverseGeocoder =[[MKReverseGeocoder alloc] initWithCoordinate:coordinate];
NSLog(@"%g",coordinate.latitude);
NSLog(@"%g",coordinate.longitude);
reverseGeocoder.delegate = self;
[reverseGeocoder start];
//????????????????????????????????????????????????????????????????????????
}
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFailWithError:(NSError *)error{
NSLog(@"MKReverseGeocoder has failed.");
}
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark{
NSLog(@"current place is :%@",placemark);
}
当我使用手写坐标时,reverseGeocoding 失败。但是当我使用从 (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation 获取的坐标时,成功。为什么?