<legend id='6BUMs'><style id='6BUMs'><dir id='6BUMs'><q id='6BUMs'></q></dir></style></legend>
<tfoot id='6BUMs'></tfoot>

  • <small id='6BUMs'></small><noframes id='6BUMs'>

          <bdo id='6BUMs'></bdo><ul id='6BUMs'></ul>
      1. <i id='6BUMs'><tr id='6BUMs'><dt id='6BUMs'><q id='6BUMs'><span id='6BUMs'><b id='6BUMs'><form id='6BUMs'><ins id='6BUMs'></ins><ul id='6BUMs'></ul><sub id='6BUMs'></sub></form><legend id='6BUMs'></legend><bdo id='6BUMs'><pre id='6BUMs'><center id='6BUMs'></center></pre></bdo></b><th id='6BUMs'></th></span></q></dt></tr></i><div id='6BUMs'><tfoot id='6BUMs'></tfoot><dl id='6BUMs'><fieldset id='6BUMs'></fieldset></dl></div>

        第一次 MKReverseGeocoder: didFailWithError:Error Domain=NS

        时间:2023-09-01

        <small id='RDCk9'></small><noframes id='RDCk9'>

          <tbody id='RDCk9'></tbody>
          <legend id='RDCk9'><style id='RDCk9'><dir id='RDCk9'><q id='RDCk9'></q></dir></style></legend>
          1. <tfoot id='RDCk9'></tfoot>
            <i id='RDCk9'><tr id='RDCk9'><dt id='RDCk9'><q id='RDCk9'><span id='RDCk9'><b id='RDCk9'><form id='RDCk9'><ins id='RDCk9'></ins><ul id='RDCk9'></ul><sub id='RDCk9'></sub></form><legend id='RDCk9'></legend><bdo id='RDCk9'><pre id='RDCk9'><center id='RDCk9'></center></pre></bdo></b><th id='RDCk9'></th></span></q></dt></tr></i><div id='RDCk9'><tfoot id='RDCk9'></tfoot><dl id='RDCk9'><fieldset id='RDCk9'></fieldset></dl></div>

                  <bdo id='RDCk9'></bdo><ul id='RDCk9'></ul>
                • 本文介绍了第一次 MKReverseGeocoder: didFailWithError:Error Domain=NSURLErrorDomain Code=-1011 {PBHTTPStatusCode=503}的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  在我的应用程序中,reverseGeocoder 的结果类似于下面的错误块:

                  In my application at first time reverseGeocoder results like error block below :

                  didFailWithError:错误Domain=NSURLErrorDomain Code=-1011 "无法执行该操作完全的.(NSURLErrorDomain 错误 -1011.)UserInfo=0x6252100{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);
                  }
                  

                  第一次进入错误块(有时).我有什么遗漏吗,请帮帮我?

                  The first time its going to error block (some times). Am I missing any thing please help me out?

                  推荐答案

                  Error -1011 is Bad Server Response (来自 apple docs here) 并且 HTTP 状态码是 503(服务不可用).

                  Error -1011 is Bad Server Response (from the apple docs here) and the HTTP status code is 503 (Service Unavailable).

                  所以,我想除非你给他们无效的数据,否则他们的结局是个问题!

                  So, I guess that unless you're giving them invalid data, it's a problem their end!

                  但是,您可能会考虑检查一些极端情况:

                  However, there are a few edge cases that you might consider checking :

                  (1)坐标的值是多少?如果它无效,那么地理编码器可能会返回某种错误(尽管它可能不应该返回 503 ;)

                  (1) What's the value of coordinate? If it's invalid then the geocoder probably returns some sort of error (though it probably shouldn't return 503 ;)

                  (2) 您是否支持代理/网络身份验证 - 如果您支持,那么您实际上并不是在与地理编码服务对话,而是在与可能无法理解您要做什么的代理对话!

                  (2) Are you behind a proxy / web authentication - if you are then you're not actually talking to a geocoding service, you're talking to a proxy which probably won't understand what you're trying to do!

                  这篇关于第一次 MKReverseGeocoder: didFailWithError:Error Domain=NSURLErrorDomain Code=-1011 {PBHTTPStatusCode=503}的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:带有 locationListener 回调的 Android 服务 下一篇:iOS 使用当前位置权限对话框在 Phonegap 应用程序中

                  相关文章

                  最新文章

                • <legend id='3vypp'><style id='3vypp'><dir id='3vypp'><q id='3vypp'></q></dir></style></legend>

                  <small id='3vypp'></small><noframes id='3vypp'>

                  1. <i id='3vypp'><tr id='3vypp'><dt id='3vypp'><q id='3vypp'><span id='3vypp'><b id='3vypp'><form id='3vypp'><ins id='3vypp'></ins><ul id='3vypp'></ul><sub id='3vypp'></sub></form><legend id='3vypp'></legend><bdo id='3vypp'><pre id='3vypp'><center id='3vypp'></center></pre></bdo></b><th id='3vypp'></th></span></q></dt></tr></i><div id='3vypp'><tfoot id='3vypp'></tfoot><dl id='3vypp'><fieldset id='3vypp'></fieldset></dl></div>

                    <tfoot id='3vypp'></tfoot>
                      <bdo id='3vypp'></bdo><ul id='3vypp'></ul>