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);
}
Lorsque j'utilise la coordonnée manuscrite, le reverseGeocoding a échoué. mais quand j'utilise le - coordonnée obtenu de (vide) gestionnaire de locationManager: (CLLocationManager *) didUpdateToLocation: (CLLocation *) newLocation fromLocation: (CLLocation *) oldLocation, a réussi. Pourquoi?ios reverseGeocoder a échoué lorsque j'ai corrigé les coordonnées?