【问题标题】:iPad - Issue using CLLocationManageriPad - 使用 CLLocationManager 的问题
【发布时间】:2014-09-24 14:48:07
【问题描述】:

我需要在没有互联网的情况下使用 GPS 找到我的当前位置并在 Google 地图上显示。

在 iPhone 上

一切正常,显示位置。

在 iPad 上

我将CLLocationManager 用作delegate。然而它在方法didFailWithError:(NSError *)error 上返回了以下错误:

Error Domain=kCLErrorDomain Code=0 "操作无法完成。(kCLErrorDomain error 0.)"

创建CLLocationManager代码:

locationManager                 = [[CLLocationManager alloc]init];
locationManager.delegate        = self;
locationManager.distanceFilter  = kCLDistanceFilterNone;
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
[locationManager startUpdatingLocation];

PS:我需要在没有任何互联网连接的情况下找到当前位置。 iPad 在状态栏上显示指示器本地化。 (互联网连接一切正常并显示位置)。 iPad 是第 4 代 iOS 7.1。

【问题讨论】:

    标签: ios ipad cocoa gps


    【解决方案1】:

    只有 wifi 的 iPad 型号没有 GPS 接收器。它只能通过wifi数据接收位置数据。您需要 wifi + 蜂窝 iPad 才能在没有 wifi 的情况下完成定位。

    注意,这也适用于 iPod touch 机型。作为iOS设备的一般规则,如果它没有手机接收器,它必须使用wifi进行GPS。

    【讨论】:

    • 我真的不知道这一点。非常感谢。
    猜你喜欢
    • 2019-03-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-02
    • 2014-08-31
    • 2011-11-23
    • 1970-01-01
    相关资源
    最近更新 更多