2 o 1001 o O_1001_O 于 2013.07.31 14:09 提问

MKMapRectMake缩放

MKMapRectMake标记东北和西南显示区域。

我能否设置之后将地图缩放一点?

routeRect = MKMapRectMake(southWestPoint.x, southWestPoint.y, northEastPoint.x - southWestPoint.x, northEastPoint.y - southWestPoint.y);
[self.mapView setVisibleMapRect:routeRect];

应该如何对地图进行缩放?

1个回答

Mr_me
Mr_me   2013.07.31 14:21
已采纳
MKCoordinateRegion region = MKCoordinateRegionForMapRect(routeRect);
MKCoordinateSpan span;
span.latitudeDelta = 0.09;
span.longitudeDelta = 0.09;
region.span = span;
region = [self.mapView regionThatFits:region];
[_mapView setRegion:region animated:YES];
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!