我正在使用以下纬度和经度发出 ReverseGeoCoder 请求
纬度 = 37.296740 经度 = -122.001878
我收到一个错误,因为“/SourceCache/ProtocolBuffer/ProtocolBuffer-19/Runtime/PBRequester.m:446 服务器返回错误:503”
ReverseGeoCoder 失败消息为“Error Domain=PBRequesterErrorDomain Code=6001”,操作无法完成。(PBRequesterErrorDomain 错误 6001。)“
这是我的一段代码:
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
NSLog(@"Geocoordinates : %f, %f", geoCoord.latitude, geoCoord.longitude);
MKReverseGeocoder *geocoder=[[MKReverseGeocoder alloc] initWithCoordinate:geoCoord];
geocoder.delegate=self;
[geocoder start];
}
#pragma mark -
#pragma mark Geocoder Delegate Methods
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFailWithError:(NSError *)error{
NSLog(@"ReverseGeoCoder did fail : %@", [error description]);
}
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark{
NSLog(@"Geocoder completed = %@", [placemark addressDictionary]);
}
Output:
========
Geocoordinates : 40.725135, -74.002087
/SourceCache/ProtocolBuffer/ProtocolBuffer-19/Runtime/PBRequester.m:446 server returned error: 503
2010-06-15 11:08:29.819 Hotlist[2253:207] ReverseGeoCoder did fail : Error Domain=PBRequesterErrorDomain Code=6001 "Operation could not be completed. (PBRequesterErrorDomain error 6001.)"
这个错误是什么原因造成的??
有任何想法吗 ??
谢谢