ReverseGeoCoder Fail Error in Mapkit

你说的曾经没有我的故事 提交于 2019-12-24 02:59:10

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/3031038/reversegeocoder-fail-error-in-mapkit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!