Mapkit 中的 ReverseGeoCoder 失败错误
我正在使用以下纬度和经度发出 ReverseGeoCoder 请求
Latitude = 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.)"
这个错误是什么原因造成的?
有什么想法吗?
谢谢
I am making the ReverseGeoCoder request with the following latitude and longitude
Latitude = 37.296740
Longitude = -122.001878
I am getting an error as "/SourceCache/ProtocolBuffer/ProtocolBuffer-19/Runtime/PBRequester.m:446 server returned error: 503"
With the ReverseGeoCoder fail message as "Error Domain=PBRequesterErrorDomain Code=6001 "Operation could not be completed. (PBRequesterErrorDomain error 6001.)"
This is my piece of code :
// 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.)"
What is this error due to ??
Any ideas ??
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的代码中没有任何内容看起来不合适。您正在恢复服务器 503,因此您可能由于请求量或请求率过高而被拒绝。您是否在具有不同外部 IP 地址的第二台设备或开发计算机(不仅仅是同一 NAT 或代理后面的另一台设备)上尝试过此操作,或者只是在等待一段时间后尝试过此操作。
此外部站点上有一些其他人因频率或数量而点击此链接的讨论:
http://www.iphonedevsdk.com/forum/iphone-sdk-development/31883-pbrequestererrordomain-errors-reverse-geocoding.html
Nothing looks out of place in your code. You are getting a server 503 back so perhaps you are being denied due to excessive request volume or request rate. Have you tried this on a second device or development machine with a different external IP address (not just another device behind the same NAT or proxy) or simply after waiting a good period of time.
There is some discussion of others hitting this due to frequency or volume on this external site:
http://www.iphonedevsdk.com/forum/iphone-sdk-development/31883-pbrequestererrordomain-errors-reverse-geocoding.html