⇒
//ヘッダーより
MKMapView *aMap;
CLLocation *currentLocation;
distance = 1500;
//クラスより
MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance(currentLocation.coordinate, distance, distance);
[aMap setCenterCoordinate:currentLocation.coordinate animated:YES];
[aMap setRegion:region animated:NO];
//以下のデリゲートメソッドで現在地の吹き出しを日本語に変更する事が可能
-(MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id)annotation
{
if (annotation == aMap.userLocation) {
// 現在地 変更
[(MKUserLocation*)annotation setTitle:@"現在地"];
[(MKUserLocation*)annotation setSubtitle:@"今、ここに居ます"];
return nil;
}
MKAnnotationView *annotationView;
//アノテーションの処理を記述する
return annotationView;
}
0 件のコメント:
コメントを投稿