pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

  • <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="02kiook" 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中從經(jīng)度和緯度識別時區(qū)

        How to identify timezone from longitude and latitude in iOS(如何在iOS中從經(jīng)度和緯度識別時區(qū))
        <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="sycmkg2" 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中從經(jīng)度和緯度識別時區(qū)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時送ChatGPT賬號..

                  如何找出給定的經(jīng)度和緯度屬于哪個 NSTimeZone?

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

                  推薦答案

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

                  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.

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

                  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)
                       }
                  }
                  

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

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

                  相關(guān)文檔推薦

                  How to animate a UIImageview to display fullscreen by tapping on it?(如何通過點(diǎn)擊動畫 UIImageview 以顯示全屏?)
                  To stop segue and show alert(停止 segue 并顯示警報)
                  iOS 5 storyboard, programmatically determine path(iOS 5 故事板,以編程方式確定路徑)
                  Icon already includes gloss effects(圖標(biāo)已經(jīng)包含光澤效果)
                  How does UIEdgeInsetsMake work?(UIEdgeInsetsMake 是如何工作的?)
                  UIProgressView and Custom Track and Progress Images (iOS 5 properties)(UIProgressView 和自定義跟蹤和進(jìn)度圖像(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="qkk2kma" 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>
                          • 主站蜘蛛池模板: 木材烘干机,木炭烘干机,纸管/佛香烘干设备-河南蓝天机械制造有限公司 | 福建珂朗雅装饰材料有限公司「官方网站」| 二手Sciex液质联用仪-岛津气质联用仪-二手安捷伦气质联用仪-上海隐智科学仪器有限公司 | 生物除臭剂-除味剂-植物-污水除臭剂厂家-携葵环保有限公司 | PC构件-PC预制构件-构件设计-建筑预制构件-PC构件厂-锦萧新材料科技(浙江)股份有限公司 | 北京工业设计公司-产品外观设计-产品设计公司-千策良品工业设计 北京翻译公司-专业合同翻译-医学标书翻译收费标准-慕迪灵 | 天空彩票天下彩,天空彩天空彩票免费资料,天空彩票与你同行开奖,天下彩正版资料大全 | 恒温水槽与水浴锅-上海熙浩实业有限公司| ERP企业管理系统永久免费版_在线ERP系统_OA办公_云版软件官网 | 胶原检测试剂盒,弹性蛋白检测试剂盒,类克ELISA试剂盒,阿达木单抗ELISA试剂盒-北京群晓科苑生物技术有限公司 | 预制围墙_工程预制围墙_天津市瑞通建筑材料有限公司 | 缠绕机|缠绕膜包装机|缠绕包装机-上海晏陵智能设备有限公司 | 北京公司注册_代理记账_代办商标注册工商执照-企力宝 | 六维力传感器_六分量力传感器_模腔压力传感器-南京数智微传感科技有限公司 | 交变/复合盐雾试验箱-高低温冲击试验箱_安奈设备产品供应杭州/江苏南京/安徽马鞍山合肥等全国各地 | POM塑料_PBT材料「进口」聚甲醛POM杜邦原料、加纤PBT塑料报价格找利隆塑料 | 玻璃钢罐_玻璃钢储罐_盐酸罐厂家-河北华盛节能设备有限公司 | 紫外线老化试验箱_uv紫外线老化试验箱价格|型号|厂家-正航仪器设备 | 钢木实验台-全钢实验台-化验室通风柜-实验室装修厂家-杭州博扬实验设备 | 铝镁锰板厂家_进口钛锌板_铝镁锰波浪板_铝镁锰墙面板_铝镁锰屋面-杭州军晟金属建筑材料 | 脉冲除尘器,除尘器厂家-淄博机械 | 三氯异氰尿酸-二氯-三氯-二氯异氰尿酸钠-优氯净-强氯精-消毒片-济南中北_优氯净厂家 | 金属波纹补偿器厂家_不锈钢膨胀节价格_非金属伸缩节定制-庆达补偿器 | PCB接线端子_栅板式端子_线路板连接器_端子排生产厂家-置恒电气 喷码机,激光喷码打码机,鸡蛋打码机,手持打码机,自动喷码机,一物一码防伪溯源-恒欣瑞达有限公司 假肢-假肢价格-假肢厂家-河南假肢-郑州市力康假肢矫形器有限公司 | Safety light curtain|Belt Sway Switches|Pull Rope Switch|ultrasonic flaw detector-Shandong Zhuoxin Machinery Co., Ltd | 厚壁钢管-厚壁无缝钢管-小口径厚壁钢管-大口径厚壁钢管 - 聊城宽达钢管有限公司 | 杭州厂房降温,车间降温设备,车间通风降温,厂房降温方案,杭州嘉友实业爽风品牌 | 线粒体膜电位荧光探针-细胞膜-标记二抗-上海复申生物科技有限公司 | 青海电动密集架_智能密集架_密集架价格-盛隆柜业青海档案密集架厂家 | 物流公司电话|附近物流公司电话上门取货 | 媒介云-全网整合营销_成都新闻媒体发稿_软文发布平台 | 华东师范大学在职研究生招生网_在职研究生招生联展网 | 对夹式止回阀厂家,温州对夹式止回阀制造商--永嘉县润丰阀门有限公司 | 杭州代理记账费用-公司注销需要多久-公司变更监事_杭州福道财务管理咨询有限公司 | 运动木地板厂家_体育木地板安装_篮球木地板选购_实木运动地板价格 | 书信之家_书信标准模板范文大全| 合肥废气治理设备_安徽除尘设备_工业废气处理设备厂家-盈凯环保 合肥防火门窗/隔断_合肥防火卷帘门厂家_安徽耐火窗_良万消防设备有限公司 | 山东包装,山东印刷厂,济南印刷厂-济南富丽彩印刷有限公司 | 物流之家新闻网-最新物流新闻|物流资讯|物流政策|物流网-匡匡奈斯物流科技 | 重庆私家花园设计-别墅花园-庭院-景观设计-重庆彩木园林建设有限公司 | 警方提醒:赣州约炮论坛真的安全吗?2025年新手必看的网络交友防坑指南 |