我正在实现showuserlocation=TRUE
属性来在地图上显示一个蓝点。
单击蓝点将产生标题为Current Location的标注。
我指的是iPhone上的默认地图应用程序。我已将标题应用到它,以便它旋转,以显示与地图应用程序相同的北。
但是当我的地图像标题一样旋转时,当前位置标注也会旋转。
我希望它停留在一个地方,因为在iPhone地图应用程序。
发布于 2012-03-06 17:26:41
如果希望标注始终保持垂直
- (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading
{
for (id<MKAnnotation> annotation in mapView.annotations)
{
NSLog(@"keep callout vertical");
MKAnnotationView* annotationView = [mapView viewForAnnotation:annotation];
[annotationView setTransform:CGAffineTransformMakeRotation(0)];
}
}
https://stackoverflow.com/questions/9556743
复制相似问题