久久久久久久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>
                          • 主站蜘蛛池模板: 人人爽人人爽人人片av | 亚洲成av片人久久久 | 美女爽到呻吟久久久久 | 欧美日韩在线精品 | www.亚洲一区二区 | 天天精品在线 | 91精品久久久久久久久99蜜臂 | 久久久久久免费免费 | 成人午夜在线观看 | 免费在线观看一区二区 | 男人的天堂中文字幕 | 国产精品久久久久久久久久三级 | 亚洲国产小视频 | 日本人做爰大片免费观看一老师 | 国产精品乱码一区二三区小蝌蚪 | 在线看国产 | 成人免费视频在线观看 | 特级特黄特色的免费大片 | 日韩视频91 | 国产精品久久久久久婷婷天堂 | 一二三四在线视频观看社区 | 超碰日韩 | 成人精品久久久 | 99精品国产一区二区青青牛奶 | 欧美一级视频 | 人人草天天草 | 作爱视频免费看 | 国产高清在线精品一区二区三区 | 国产精品五月天 | 亚洲第1页| 老司机狠狠爱 | 日韩一级不卡 | 精品久久久一区 | a级在线免费观看 | 黄色毛片大全 | 欧美久久久久 | 亚洲精品www| 国产精品亚洲欧美日韩一区在线 | 日韩精品人成在线播放 | 国产97在线视频 | 伊人伊人 |