I'd like to center a map (mapkit) against the user's location. I do the following in the simulator but only get a blue map with no content. What steps should I be taking?
MKCoordinateRegion region;
MKCoordinateSpan span;
span.latitudeDelta=0.2;
span.longitudeDelta=0.2;
CLLocationCoordinate2D location;
location.latitude = mapView.userLocation.location.coordinate.latitude;
location.longitude = mapView.userLocation.location.coordinate.longitude;
region.span=span;
region.center=location;
[self.mapView setRegion:region animated:TRUE];
[self.mapView regionThatFits:region];
The long/lat values from the above are:
location.latitude = 1.0256307104653269e-305
location.longitude = 1.2742349910917941e-313
--- EDIT ---
I found the answer to my follow up comment here: http://stackoverflow.com/questions/1764019/mapkit-userlocation-found-event. Used with the answer below, that provides the solution.