我在我的位置上尝试中心地图,但我的位置现在是地图的3/4。它正在运作,但现在我想zoom in
更多关于我的立场。你能救我吗?
CLLocationCoordinate2D objCoor2D = {.latitude = latitude_UserLocation, .longitude = longitude_UserLocation};
MKMapRect r = [self.mapView visibleMapRect];
MKMapPoint pt = MKMapPointForCoordinate(objCoor2D);
r.origin.x = pt.x - r.size.width * 0.5;
r.origin.y = pt.y - r.size.height * 0.75;
[self.mapView setVisibleMapRect:r animated:YES];