我通过使用启用来显示current locationin .我还希望将用户当前位置以及位置的缩放地图居中.请帮我解决这个问题,因为我在stackoverflow上没有得到任何其他类似问题的帮助.MKMapViewshowUserLocationmapview
我的代码如下:
- (void)viewDidLoad {
[super viewDidLoad];
[mapView setMapType:MKMapTypeStandard];
[mapView setZoomEnabled:YES];
[mapView setScrollEnabled:YES];
[mapView setCenterCoordinate:mapView.userLocation.location.coordinate animated:YES];
[mapView setDelegate:self];
}
Run Code Online (Sandbox Code Playgroud)