zoukankan      html  css  js  c++  java
  • web定位处理

    【一】、iOS8

    1.导入头文件 #import <CoreLocation/CoreLocation.h>

    2.在info.plist中设置配置

    NSLocationWhenInUseDescription

    NSLocationAlwaysUsageDescription

    3.在webview需要定位的地方添加如下代码

    @property (nonatomic, strong) CLLocationManager *locationMgr;
      if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8) {

                    //由于IOS8中定位的授权机制改变 需要进行手动授权
                      self.locationMgr = [[CLLocationManager alloc] init];

                      //获取授权认证
                      [self.locationMgr requestAlwaysAuthorization];
                      [self.locationMgr requestWhenInUseAuthorization];
           }

    【二】、安卓

    http://blog.csdn.net/shuyou612/article/details/45310941

  • 相关阅读:
    Spring自动代理机制
    JUnit4 详解
    struts2 OGNL
    loj4j的配置跟使用
    junit浅学笔记二
    shell变量设置
    zookeeper使用
    [zz]Linux kernel map
    glog 使用中存在的问题
    shell中特殊字符(串)
  • 原文地址:https://www.cnblogs.com/superbobo/p/6878780.html
Copyright © 2011-2022 走看看