iphoneiosmapkituserlocationmkcoordinateregion

iOS MapKit userLocation returning zero on first call, but


I have a curious issue that I can't explain and was wondering if anybody has encountered the same problem.

I have a MKMapView that displays the user's current location, and is written to center the region over that location when loaded. When I load the view, the map defaults to lat zero and long zero (somewhere in Africa). When I leave the view to the previous screen on the stack, and then go back to it everything works properly and I get a mapview centered over Cupertino, California as expected.

Can anyone explain this?

Cheers! :D


Solution

  • mapView.showsUserLocation=YES;
    

    Its Working Device Perfect when ever Location manager unable to Track The Location Then Its Shows Default Location Thats lat zero and long zero so Its Shows In Africa.

    Check In Device It Will Work Fine.