ビューコントローラーに、場所が変更されたときに呼び出されるマップキットを備えた関数があります。現在の場所を中心にして、更新されると移動するようにマップ ビューに設定したいと思います。
ある意味では機能します。つまり、追跡しますが、常に非常にズームインされます。ズームアウトすると、新しい場所を取得した後に更新を再度呼び出したときの場所に戻ります。
in from params CLLocation *loc
bool first = TRUE;
if(first){
first=FALSE; // bit of a bodge...if i set this to false it will track the update possition but not at the desired "zoom" its look far to close.
CLLocation *loc = [[CLLocation alloc] initWithLatitude:54.976619 longitude:-1.613118];//newcastle city center.
CLLocationDegrees spanLat = 1000;
CLLocationDegrees spanLng = 1000;
userLocation = MKCoordinateRegionMakeWithDistance(loc.coordinate, spanLat, spanLng);
[mapview setRegion:userLocation animated:TRUE];
}else {
CLLocationDegrees spanLat = [mapview region].span.latitudeDelta;// keep the originals? DOESN'T WORK!!
CLLocationDegrees spanLng = [mapview region].span.longitudeDelta;//
userLocation = MKCoordinateRegionMakeWithDistance(loc.coordinate, spanLat, spanLng);
[mapview setRegion:userLocation animated:TRUE];
}