MKMapView returns bad userLocation
I checked the box in iterface builder t开发者_如何学JAVAo show user location on map and it works fine. I want to zoom the mapView to User location with using the regions and user location, but users latitude and longitude are 0.000, and app is zooming to region with center 0 and 0. Why is this?
CLLocation *location = [[[CLLocation alloc] initWithLatitude:mapView.userLocation.location.coordinate.latitude longitude:mapView.userLocation.location.coordinate.longitude] autorelease];
Use CoreLocation to get user location, and not the map.
精彩评论