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>
                          • 主站蜘蛛池模板: 哲力实业_专注汽车涂料汽车漆研发生产_汽车漆|修补油漆品牌厂家 长沙一级消防工程公司_智能化弱电_机电安装_亮化工程专业施工承包_湖南公共安全工程有限公司 | 亿立分板机_曲线_锯片式_走刀_在线式全自动_铣刀_在线V槽分板机-杭州亿协智能装备有限公司 | 不锈钢丸厂家,铝丸,铸钢丸-淄博智源铸造材料有限公司 | 威实软件_软件定制开发_OA_OA办公系统_OA系统_办公自动化软件 | 恒温振荡混匀器-微孔板振荡器厂家-多管涡旋混匀器厂家-合肥艾本森(www.17world.net) | 厂房出租_厂房出售_产业园区招商_工业地产&nbsp;-&nbsp;中工招商网 | 石油/泥浆/不锈钢防腐/砂泵/抽砂泵/砂砾泵/吸砂泵/压滤机泵 - 专业石油环保专用泵厂家 | 衬塑设备,衬四氟设备,衬氟设备-淄博鲲鹏防腐设备有限公司 | 台湾阳明固态继电器-奥托尼克斯光电传感器-接近开关-温控器-光纤传感器-编码器一级代理商江苏用之宜电气 | 基业箱_环网柜_配电柜厂家_开关柜厂家_开关断路器-东莞基业电气设备有限公司 | 骨密度检测仪_骨密度分析仪_骨密度仪_动脉硬化检测仪专业生产厂家【品源医疗】 | 清水混凝土修复_混凝土色差修复剂_混凝土色差调整剂_清水混凝土色差修复_河南天工 | 福州甲醛检测-福建室内空气检测_环境检测_水质检测-福建中凯检测技术有限公司 | 高楼航空障碍灯厂家哪家好_航空障碍灯厂家_广州北斗星障碍灯有限公司 | 电地暖-电采暖-发热膜-石墨烯电热膜品牌加盟-暖季地暖厂家 | 全自动在线分板机_铣刀式在线分板机_曲线分板机_PCB分板机-东莞市亿协自动化设备有限公司 | 台式低速离心机-脱泡离心机-菌种摇床-常州市万丰仪器制造有限公司 | 二手光谱仪维修-德国OBLF光谱仪|进口斯派克光谱仪-热电ARL光谱仪-意大利GNR光谱仪-永晖检测 | 电镀电源整流器_高频电解电源_单脉双脉冲电源 - 东阳市旭东电子科技 | 家用净水器代理批发加盟_净水机招商代理_全屋净水器定制品牌_【劳伦斯官网】 | 广州展览制作|展台制作工厂|展览设计制作|展览展示制作|搭建制作公司 | 120kv/2mA直流高压发生器-60kv/2mA-30kva/50kv工频耐压试验装置-旭明电工 | 众品家具网-家具品牌招商_家具代理加盟_家具门户的首选网络媒体。 | 永嘉县奥阳陶瓷阀门有限公司| 搅拌磨|搅拌球磨机|循环磨|循环球磨机-无锡市少宏粉体科技有限公司 | 酒吧霸屏软件_酒吧霸屏系统,酒吧微上墙,夜场霸屏软件,酒吧点歌软件,酒吧互动游戏,酒吧大屏幕软件系统下载 | 上海地磅秤|电子地上衡|防爆地磅_上海地磅秤厂家–越衡称重 | 包头市鑫枫装饰有限公司| 硫酸亚铁-聚合硫酸铁-除氟除磷剂-复合碳源-污水处理药剂厂家—长隆科技 | 全自动固相萃取仪_高通量真空平行浓缩仪-勤业永为 | 防爆正压柜厂家_防爆配电箱_防爆控制箱_防爆空调_-盛通防爆 | 【中联邦】增稠剂_增稠粉_水性增稠剂_涂料增稠剂_工业增稠剂生产厂家 | 称重传感器,测力传感器,拉压力传感器,压力变送器,扭矩传感器,南京凯基特电气有限公司 | 视觉检测设备_自动化检测设备_CCD视觉检测机_外观缺陷检测-瑞智光电 | RTO换向阀_VOC高温阀门_加热炉切断阀_双偏心软密封蝶阀_煤气蝶阀_提升阀-湖北霍科德阀门有限公司 | 济南铝方通-济南铝方通价格-济南方通厂家-山东鲁方通建材有限公司 | 一点车讯-汽车网站,每天一点最新车讯! | 气动隔膜泵厂家-温州永嘉定远泵阀有限公司 | 驾驶人在线_专业学车门户网站 | 特种电缆厂家-硅橡胶耐高温电缆-耐低温补偿导线-安徽万邦特种电缆有限公司 | 盘古网络技术有限公司|