以我在第一次reverseGeocoder結果如下面的差錯塊應用:在第一次MKReverseGeocoder:didFailWithError:錯誤域= NSURLErrorDomain代碼= -1011 {PBHTTPStatusCode = 503}
didFailWithError:Error Domain=NSURLErrorDomain Code=-1011 "The operation couldn’t be completed. (NSURLErrorDomain error -1011.)" UserInfo=0x6252100 {PBHTTPStatusCode=503}
這是我所使用的代碼:
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation {
geocoder = [[MKReverseGeocoder alloc] initWithCoordinate:newLocation.coordinate];
[geocoder setDelegate:self];
[geocoder start];
[locationManager stopUpdatingLocation];
}
-(void)reverseGeocoder:(MKReverseGeocoder *)geocoder1 didFailWithError:(NSError *)error
{
UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"iBeen There" message:@"GPS can't track the location please check the internet connection." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
NSLog(@"reverseGeocoder:%@ didFailWithError:%@", geocoder, error);
}
它第一次去錯誤塊(有些時候)。 我是否錯過了任何幫助我的東西?
可能重複[如何處理iOS 4.3中的MKReverseGeocoder/PBHTTPStatusCode = 503錯誤?](http://stackoverflow.com/questions/5232822/how-to-deal-with-mkreversegeocoder-pbhttpstatuscode-503-errors -in-ios-4-3) – rckoenes
我看過那篇文章......我嘗試過在該文章中給出的所有解決方案,但其工作原理相同。 – Srinivas
在這裏相同.. 任何解決方案??謝謝 – Frade