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

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

    2. <tfoot id='OanlB'></tfoot>
          <bdo id='OanlB'></bdo><ul id='OanlB'></ul>
      1. 将地址地理编码为iphone中的坐标

        时间:2023-05-30
        <legend id='Zr2sL'><style id='Zr2sL'><dir id='Zr2sL'><q id='Zr2sL'></q></dir></style></legend>
              <i id='Zr2sL'><tr id='Zr2sL'><dt id='Zr2sL'><q id='Zr2sL'><span id='Zr2sL'><b id='Zr2sL'><form id='Zr2sL'><ins id='Zr2sL'></ins><ul id='Zr2sL'></ul><sub id='Zr2sL'></sub></form><legend id='Zr2sL'></legend><bdo id='Zr2sL'><pre id='Zr2sL'><center id='Zr2sL'></center></pre></bdo></b><th id='Zr2sL'></th></span></q></dt></tr></i><div id='Zr2sL'><tfoot id='Zr2sL'></tfoot><dl id='Zr2sL'><fieldset id='Zr2sL'></fieldset></dl></div>

                <bdo id='Zr2sL'></bdo><ul id='Zr2sL'></ul>

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

                <tfoot id='Zr2sL'></tfoot>
                  <tbody id='Zr2sL'></tbody>

                • 本文介绍了将地址地理编码为iphone中的坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我正在尝试使用以下代码将地址地理编码为坐标:

                  I am trying to geocode address into coordinates using following code:

                  CLGeocoder *geocoder = [[CLGeocoder alloc] init];
                      [geocoder geocodeAddressString:@"6138 Bollinger Road, San Jose, United States" completionHandler:^(NSArray* placemarks, NSError* error){
                                       for (CLPlacemark* aPlacemark in placemarks)
                                       {
                                           // Process the placemark.
                                           NSString *latDest1 = [NSString stringWithFormat:@"%.4f",aPlacemark.location.coordinate.latitude];
                                           NSString *lngDest1 = [NSString stringWithFormat:@"%.4f",aPlacemark.location.coordinate.longitude];
                                           lblDestinationLat.text = latDest1;
                                           lblDestinationLng.text = lngDest1;
                                       }
                                   }];
                  

                  我已经尝试了很多次,但调试器从不进入块,我无法获得位置.有人可以帮我吗?

                  I have tried it many times but the debugger never enters the block and I am not able to get the location. Can someone please help me with it?

                  问候
                  潘卡伊

                  推荐答案

                  好吧,我发现我的错误了.代码是正确的并且工作完美.我一直在通过调试器处理它,并试图找出调试器没有进入块的原因.但是现在我发现调试器此时没有进入该块.获取位置值所需的时间很少.它是异步完成的,因此我无法找到它,并且由于崩溃后没有值而导致崩溃.我已将代码发布块移到块内,现在一切正常.

                  All right I found my mistake. The code is correct and works perfect. All the while I was working on it was through debugger and was trying to figure out why the debugger did not enter the block. But now I have found out debugger does not enter the block at that moment. It takes little in getting the location values. It is done asynchronously so I was not able to find it and I was getting crash because of no values just after the crash. I have moved my code post block to inside the block and everything works fine for me now.

                  这篇关于将地址地理编码为iphone中的坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:'支持的方向与应用程序没有共同的方向,并且 下一篇:覆盖 initWithCoder 时的无限循环

                  相关文章

                  最新文章

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

                      <bdo id='sA9Ov'></bdo><ul id='sA9Ov'></ul>

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