Question: I'm developing with MKMapView class,
When running on the device (iPhone5) and with AirPlane mode ON , Wi-Fi ON,

and the property of MKMapView：`showsUserLocation`setting to `YES`，the delegate of MKMapView 

`- (void)mapView:(MKMapView *)mapView didFailToLocateUserWithError:(NSError *)error`

is called, returning an error

```
Turn off airplane mode or use Wi-Fi to show your location on the map

```

telling me to turn of AirPlane mode or Turn on Wi-Fi to get location on the map.
My Airplane mode is on, but my Wi-Fi is Enabled, why can't I locate my position？

Is it a bug of MKMapView，or something else？
thanks!

Answer: 
[The apple documentation says](http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/LocationAwarenessPG/CoreLocation/CoreLocation.html)

> 
> Determining Whether Location Services Are Available
> 
> 
> Every iOS-based
> device is capable of supporting location services in some form but
> there are still situations where location services may not be
> available:
> 
> 
> The user can disable location services in the Settings app.
> 
> 
> The user
> can deny location services for a specific app.
> 
> 
> The device might be in
> Airplane mode and unable to power up the necessary hardware. For these
> reasons, it is recommended that you always call the
> locationServicesEnabled class method of CLLocationManager before
> attempting to start either the standard or significant-change location
> services. (In iOS 3.x and earlier, check the value of the
> locationServicesEnabled property instead.) If this class method
> returns YES, you can start location services as planned. If it returns
> NO and you attempt to start location services anyway, the system
> prompts the user to confirm whether location services should be
> reenabled. Given that location services are very likely to be disabled
> on purpose, the user might not welcome this prompt.
> 
> 
> 

Nope not a bug it is said explicitly in the docs how to do it
I believe that when the airplane mode is switched on it turns off all the possible ways to track your position, wi-fi included.

You can try it with your device by switching the airplane mode on while connected to the internet via wi-fi and accessing any webpage via safari.