UIMapView:用户位置注释仅在iPad中为白色而不是蓝色脉冲

问题描述:

我一直在使用地图一段时间,所以我理解了显示用户位置需要发生的基本知识

I've been working with maps for a while so I understand the basics of what needs to happen to show the user's location

map.showsUserLocation = YES; //also have the box checked in .xib

设置locationManager

set up the locationManager

- (CLLocationManager *)locationManager {

if (locationManager != nil) {
    return locationManager;
}

locationManager = [[CLLocationManager alloc] init];
[locationManager setDesiredAccuracy:kCLLocationAccuracyNearestTenMeters];
[locationManager setDelegate:self];

return locationManager;
}

我已经登录并看到我正在点击didUpdateUserLocation方法

I've logged and see that I'm hitting the didUpdateUserLocation method

- (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation {

if (!userLoc)
{
    //NSLog(@"Mapping - didUpdateUserLocation");
    userLoc = userLocation.location;
}

    [locationManager startUpdatingLocation];
}

我还要确保不删除用户的注释

and I'm also making sure I don't remove the user's annotation

if (![annotation isKindOfClass:[MKUserLocation class]])

...为什么蓝点在iPhone上显示并发出脉冲,但只在iPad上显示为白点? (两个设备都是iOS 7.1.1)

...so why is the blue dot showing and pulsing on the iPhone, but showing as a white dot only on the iPad? (Both devices are iOS 7.1.1)

只有拥有手机的iPad才能访问GPS,这就是蓝色脉冲dot代表MKMapView。每个iPhone都有GPS,这就是为什么你会看到该设备上的脉冲点。

Only iPad's with cellular will have access to the GPS which is what the blue pulsing dot represents in MKMapView. Every iPhone has GPS which is why you are seeing the pulsing dot on that device.

如果没有蜂窝(3G / 4G / LTE),iPad只能使用WiFi进行三角测量,这不足以导航。

Without cellular (3G/4G/LTE) the iPad can only use WiFi to triangulate position, which is not accurate enough for navigation.