Authored by Thomas Rasch

Merge pull request #91 from mapbox/fix-annotation-rotation

only rotate marker annotations when rotating map view
... ... @@ -2541,10 +2541,7 @@
_overlayView.transform = CGAffineTransformIdentity;
for (RMAnnotation *annotation in _annotations)
{
if ( ! annotation.isUserLocationAnnotation)
annotation.layer.transform = CATransform3DIdentity;
}
annotation.layer.transform = CATransform3DIdentity;
}
completion:nil];
... ... @@ -2586,10 +2583,7 @@
_overlayView.transform = CGAffineTransformIdentity;
for (RMAnnotation *annotation in _annotations)
{
if ( ! annotation.isUserLocationAnnotation)
annotation.layer.transform = CATransform3DIdentity;
}
annotation.layer.transform = CATransform3DIdentity;
}
completion:nil];
... ... @@ -2800,10 +2794,8 @@
_overlayView.transform = CGAffineTransformMakeRotation(angle);
for (RMAnnotation *annotation in _annotations)
{
if ( ! annotation.isUserLocationAnnotation)
if ([annotation.layer isKindOfClass:[RMMarker class]] && ! annotation.isUserLocationAnnotation)
annotation.layer.transform = CATransform3DMakeAffineTransform(CGAffineTransformMakeRotation(-angle));
}
}
completion:nil];
... ...