【发布时间】:2012-01-05 14:07:21
【问题描述】:
我通过使用showUserLocation 启用在MKMapView 中显示current location。我还想将mapview 居中到用户当前位置以及位置的缩放地图。请帮助我解决这个问题,因为我没有从 stackoverflow 上的其他类似问题中获得任何帮助。
我的代码如下:
- (void)viewDidLoad {
[super viewDidLoad];
[mapView setMapType:MKMapTypeStandard];
[mapView setZoomEnabled:YES];
[mapView setScrollEnabled:YES];
[mapView setCenterCoordinate:mapView.userLocation.location.coordinate animated:YES];
[mapView setDelegate:self];
}
【问题讨论】: