Authored by Justin R. Miller

only rotate marker annotations when rotating map view

@@ -2541,11 +2541,8 @@ @@ -2541,11 +2541,8 @@
2541 _overlayView.transform = CGAffineTransformIdentity; 2541 _overlayView.transform = CGAffineTransformIdentity;
2542 2542
2543 for (RMAnnotation *annotation in _annotations) 2543 for (RMAnnotation *annotation in _annotations)
2544 - {  
2545 - if ( ! annotation.isUserLocationAnnotation)  
2546 annotation.layer.transform = CATransform3DIdentity; 2544 annotation.layer.transform = CATransform3DIdentity;
2547 } 2545 }
2548 - }  
2549 completion:nil]; 2546 completion:nil];
2550 2547
2551 if (userLocationTrackingView || userHeadingTrackingView) 2548 if (userLocationTrackingView || userHeadingTrackingView)
@@ -2586,11 +2583,8 @@ @@ -2586,11 +2583,8 @@
2586 _overlayView.transform = CGAffineTransformIdentity; 2583 _overlayView.transform = CGAffineTransformIdentity;
2587 2584
2588 for (RMAnnotation *annotation in _annotations) 2585 for (RMAnnotation *annotation in _annotations)
2589 - {  
2590 - if ( ! annotation.isUserLocationAnnotation)  
2591 annotation.layer.transform = CATransform3DIdentity; 2586 annotation.layer.transform = CATransform3DIdentity;
2592 } 2587 }
2593 - }  
2594 completion:nil]; 2588 completion:nil];
2595 2589
2596 userLocation.layer.hidden = NO; 2590 userLocation.layer.hidden = NO;
@@ -2800,11 +2794,9 @@ @@ -2800,11 +2794,9 @@
2800 _overlayView.transform = CGAffineTransformMakeRotation(angle); 2794 _overlayView.transform = CGAffineTransformMakeRotation(angle);
2801 2795
2802 for (RMAnnotation *annotation in _annotations) 2796 for (RMAnnotation *annotation in _annotations)
2803 - {  
2804 - if ( ! annotation.isUserLocationAnnotation) 2797 + if ([annotation.layer isKindOfClass:[RMMarker class]] && ! annotation.isUserLocationAnnotation)
2805 annotation.layer.transform = CATransform3DMakeAffineTransform(CGAffineTransformMakeRotation(-angle)); 2798 annotation.layer.transform = CATransform3DMakeAffineTransform(CGAffineTransformMakeRotation(-angle));
2806 } 2799 }
2807 - }  
2808 completion:nil]; 2800 completion:nil];
2809 2801
2810 [CATransaction commit]; 2802 [CATransaction commit];