Hi I have this code to zoom in on the users location.
-(IBAction)getLocation{
mapview.showsUserLocation = YES;
MKCoordinateRegion region = { {0.0, 0.0}, {0.0, 0.0} };
region.center = mapview.userLocation.coordinate;
region.span.longitudeDelta = 0.1f;
region.span.latitudeDelta = 0.1f;
[mapview setRegion:region animated:YES];
}
On the first press of the button the map moves to coordinate 0,0, however on any subsequent presses it works as it should and takes the map to the users location. I cannot figure out why it does not work on the first go but works everytime after that??