所以我有一个MKMapVie对象,它的设置如下:
self.mapView = [[MKMapView alloc] initWithFrame:CGRectMake(0, 0,
[Screen width],
[Screen height])];
self.mapView.mapType = MKMapTypeSatellite;
self.mapView.userInteractionEnabled = YES;
self.mapView.scrollEnabled = YES;
self.mapView.showsUserLocation = YES;
[self addSubview:mapView];
我使用以下方法将其位置设置为当前用户位置。
- (void) locateUser {
float z2 = 0.003 * 4.0;
MKCoordinateSpan span = MKCoordinateSpanMake(z2, z2);
[self.mapView setRegion: MKCoordinateRegionMake(currentLocation, span) animated:YES];
}
然而,一旦地图缩放到用户位置,它将不允许我移动地图或捏合或缩放。有什么我想念的吗? 感谢。