1
지도 상자에서 주석의 레이어 모양을 사용자 정의하려고합니다. 모든 주석 레이어를 회전하고 싶습니다.지도 주석 달기 레이어 회전지도에서 확대/축소
- (RMMapLayer *)mapView:(RMMapView *)mapView layerForAnnotation:(RMAnnotation *)annotation
{
if (annotation.isUserLocationAnnotation)
return nil;
RMMarker *marker;
CGPoint xy = CGPointFromString(annotation.userInfo);
marker = [[RMMarker alloc] initWithUIImage:[UIImage imageNamed:@"arrow.png"]];
marker.transform = CATransform3DMakeRotation(atan2f(xy.x, xy.y) * 180/M_PI,0,0,1);
marker.canShowCallout = YES;
return marker;
}
맵을 처음로드 할 때 작동합니다. 그러나지도를 이동하거나 확대/축소 할 때 초기 변형 단위 행렬로 다시 설정됩니다.
어떻게 해결할 수 있습니까? 아니면 mapbox의 버그입니까?
아, 고마워! 나는 그것을했고, 나는 지금 그것을 필요로하는 것처럼 작동한다. Btw,지도 박스 토론은 어떻게 되었습니까? 더 이상 액세스 할 수 없습니다. – giorgos29cm