Mapkit 中的 ReverseGeoCoder 失败错误

发布于 2024-09-05 06:16:13 字数 1486 浏览 4 评论 0原文

我正在使用以下纬度和经度发出 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

鱼窥荷 2024-09-12 06:16:13

您的代码中没有任何内容看起来不合适。您正在恢复服务器 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文