久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <i id='7FRN6'><tr id='7FRN6'><dt id='7FRN6'><q id='7FRN6'><span id='7FRN6'><b id='7FRN6'><form id='7FRN6'><ins id='7FRN6'></ins><ul id='7FRN6'></ul><sub id='7FRN6'></sub></form><legend id='7FRN6'></legend><bdo id='7FRN6'><pre id='7FRN6'><center id='7FRN6'></center></pre></bdo></b><th id='7FRN6'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='7FRN6'><tfoot id='7FRN6'></tfoot><dl id='7FRN6'><fieldset id='7FRN6'></fieldset></dl></div>
  • <legend id='7FRN6'><style id='7FRN6'><dir id='7FRN6'><q id='7FRN6'></q></dir></style></legend>

      <tfoot id='7FRN6'></tfoot>
          <bdo id='7FRN6'></bdo><ul id='7FRN6'></ul>
      1. <small id='7FRN6'></small><noframes id='7FRN6'>

        如何在iOS中從經度和緯度識別時區

        How to identify timezone from longitude and latitude in iOS(如何在iOS中從經度和緯度識別時區)
        <tfoot id='F91aP'></tfoot>

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

              <tbody id='F91aP'></tbody>

          • <i id='F91aP'><tr id='F91aP'><dt id='F91aP'><q id='F91aP'><span id='F91aP'><b id='F91aP'><form id='F91aP'><ins id='F91aP'></ins><ul id='F91aP'></ul><sub id='F91aP'></sub></form><legend id='F91aP'></legend><bdo id='F91aP'><pre id='F91aP'><center id='F91aP'></center></pre></bdo></b><th id='F91aP'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='F91aP'><tfoot id='F91aP'></tfoot><dl id='F91aP'><fieldset id='F91aP'></fieldset></dl></div>

                <legend id='F91aP'><style id='F91aP'><dir id='F91aP'><q id='F91aP'></q></dir></style></legend>
                  <bdo id='F91aP'></bdo><ul id='F91aP'></ul>
                  本文介紹了如何在iOS中從經度和緯度識別時區的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  如何找出給定的經度和緯度屬于哪個 NSTimeZone?

                  How can I find out which NSTimeZone a given longitude and latitude fall in?

                  推薦答案

                  我試過 APTimeZones 庫.就我而言,我需要時區以及來自特定城市緯度的國家名稱.我通過圖書館了解它是如何工作的.它實際上有一個 JSON 格式的文件,其中包含所有時區及其相應的經緯度.它將 lat long 作為輸入并循環通過此 JSON 文件,比較所有時區的 lat long 與輸入 lat long 的距離.它返回與輸入 lat long 距離最短的時區.

                  I have tried APTimeZones library. In my case I needed Timezone as well as country name from the lat long of a particular city. I went through the library to know how it works. It actually has a file in JSON format which has all the timezones along with their corresponding lat longs. it takes the lat long as input and loops through this JSON file comparing the distances of all the timezone's lat long from the input lat long. It returns the time zone which has shortest distance from the input lat long.

                  但問題是對于一個大國邊境的城市,它返回給我鄰國的時區,因為我也從中提取了國家代碼,所以我得到了鄰國.

                  But the problem was for a city in the border of a big country, it returned me the timezone of neighbouring country, as I also extracted the country code from it, I got the neighbouring country.

                  所以在這種情況下,Apple 的原生框架非常好.

                  So Apple's native framework is far good in this case.

                  下面的代碼對我很有效.

                  And the below code worked for me well.

                  CLLocation *location = [[CLLocation alloc] initWithLatitude:your_latitude longitude:your_longitude];
                  CLGeocoder *geoCoder = [[CLGeocoder alloc]init];
                  [geoCoder reverseGeocodeLocation: location completionHandler:^(NSArray *placemarks, NSError *error)
                  {
                  CLPlacemark *placemark = [placemarks objectAtIndex:0];
                  NSLog(@"Timezone -%@",placemark.timeZone);
                  
                  //And to get country name simply.
                  NSLog(@"Country -%@",placemark.country);
                  
                  }];
                  

                  在 Swift 中

                  let location = CLLocation(latitude: your_latitude, longitude: your_longitude)
                  let geoCoder = CLGeocoder()
                  geoCoder.reverseGeocodeLocation(location) { (placemarks, err) in
                       if let placemark = placemarks?[0] {
                            print(placemark.timeZone)
                            print(placemark.country)
                       }
                  }
                  

                  這篇關于如何在iOS中從經度和緯度識別時區的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to animate a UIImageview to display fullscreen by tapping on it?(如何通過點擊動畫 UIImageview 以顯示全屏?)
                  To stop segue and show alert(停止 segue 并顯示警報)
                  iOS 5 storyboard, programmatically determine path(iOS 5 故事板,以編程方式確定路徑)
                  Icon already includes gloss effects(圖標已經包含光澤效果)
                  How does UIEdgeInsetsMake work?(UIEdgeInsetsMake 是如何工作的?)
                  UIProgressView and Custom Track and Progress Images (iOS 5 properties)(UIProgressView 和自定義跟蹤和進度圖像(iOS 5 屬性))
                    <tfoot id='e8z5U'></tfoot>
                      <bdo id='e8z5U'></bdo><ul id='e8z5U'></ul>

                      • <small id='e8z5U'></small><noframes id='e8z5U'>

                        <i id='e8z5U'><tr id='e8z5U'><dt id='e8z5U'><q id='e8z5U'><span id='e8z5U'><b id='e8z5U'><form id='e8z5U'><ins id='e8z5U'></ins><ul id='e8z5U'></ul><sub id='e8z5U'></sub></form><legend id='e8z5U'></legend><bdo id='e8z5U'><pre id='e8z5U'><center id='e8z5U'></center></pre></bdo></b><th id='e8z5U'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='e8z5U'><tfoot id='e8z5U'></tfoot><dl id='e8z5U'><fieldset id='e8z5U'></fieldset></dl></div>

                        <legend id='e8z5U'><style id='e8z5U'><dir id='e8z5U'><q id='e8z5U'></q></dir></style></legend>

                              <tbody id='e8z5U'></tbody>
                          • 主站蜘蛛池模板: caoporn免费在线视频 | 日韩av高清在线 | 综合精品在线 | 另类a v| 99久久精品免费看国产四区 | 九九热在线观看 | 波多野结衣一区二区三区 | 国产成人精品综合 | 秋霞电影一区二区 | 国产91久久久久 | 爱爱视频在线观看 | 狠狠久| 亚洲毛片在线观看 | 四虎最新| 毛片日韩| 欧美在线观看一区二区 | 久久久xx| 美国黄色一级片 | 丁香久久 | 一区二区三区亚洲 | 亚洲一区二区三区视频在线 | 精品欧美黑人一区二区三区 | 成年人视频在线免费观看 | 亚洲综合视频 | 中文字幕在线观看 | 精品久久久久香蕉网 | www.日日夜夜 | www.操.com| 91看片网 | 91精品国产一区二区三区 | 国产二区视频 | 中文字幕国产一区 | 精品成人av| 成人免费视频网站在线观看 | 91社区在线观看播放 | 亚洲精品久久久久中文字幕欢迎你 | 久久亚洲欧美日韩精品专区 | 免费高清av | 日韩免费1区二区电影 | 日韩一区中文字幕 | h视频网站在线观看 |