Iphone MKMapView返回错误的用户位置

Iphone MKMapView返回错误的用户位置,iphone,objective-c,cocoa,cocoa-touch,Iphone,Objective C,Cocoa,Cocoa Touch,我选中了iterface builder中的复选框,以便在地图上显示用户位置,效果很好。我想使用区域和用户位置将地图视图缩放到用户位置,但用户纬度和经度为0.000,应用程序正在缩放到中心为0和0的区域。为什么会这样 CLLocation *location = [[[CLLocation alloc] initWithLatitude:mapView.userLocation.location.coordinate.latitude longitude:mapView.userLocation

我选中了iterface builder中的复选框,以便在地图上显示用户位置,效果很好。我想使用区域和用户位置将地图视图缩放到用户位置,但用户纬度和经度为0.000,应用程序正在缩放到中心为0和0的区域。为什么会这样

CLLocation *location = [[[CLLocation alloc] initWithLatitude:mapView.userLocation.location.coordinate.latitude longitude:mapView.userLocation.location.coordinate.longitude] autorelease];
用于获取用户位置,而不是地图