Center the MapKitView with coordinate iOS 3.1.3
how I can center the MapKitVi开发者_运维技巧ew with coordinate in iOS 3.1.3.
With iOS 4.* I use this code but it fail with iOs 3.1.3
MKCoordinateRegion stopRegion;
stopRegion.center = coords;
mapView.region = stopRegion;
MKCoordinateSpan span;
span.latitudeDelta = .005;
span.longitudeDelta = .005;
Thanks!
MKCoordinateSpan span;
span.latitudeDelta = .005;
span.longitudeDelta = .005;
MKCoordinateRegion stopRegion;
stopRegion.center = coords;
stopRegion.span = span;
[mapView setRegion:stopRegion animated:YES];
I have found a good answer work with ios 3 and 4 :
[mapView setRegion:MKCoordinateRegionMake(coords, MKCoordinateSpanMake(.005, .005)) animated:YES];
精彩评论