summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Bounds <jesse@rebounds.net>2017-05-26 16:56:45 -0700
committerJesse Bounds <jesse@rebounds.net>2017-05-26 16:56:45 -0700
commit10c4acb3ff1e479c129fb50f0ae6fea75bbc113e (patch)
tree90957b5bd3e074fb1766d55f0f23d82b40827acc
parentd6b28d955225cd26baeb819a11dc22adc7ea3aeb (diff)
downloadqtlocation-mapboxgl-upstream/eima-rotatesWithMap.tar.gz
[ios] Simplify annotation view rotation transformupstream/eima-rotatesWithMap
-rw-r--r--platform/ios/src/MGLAnnotationView.mm7
1 files changed, 2 insertions, 5 deletions
diff --git a/platform/ios/src/MGLAnnotationView.mm b/platform/ios/src/MGLAnnotationView.mm
index bab1601f7c..94d0649413 100644
--- a/platform/ios/src/MGLAnnotationView.mm
+++ b/platform/ios/src/MGLAnnotationView.mm
@@ -174,13 +174,10 @@
{
if (self.rotatesToMatchCamera == NO) return;
- CATransform3D undoOfLastRotateTransform = CATransform3DInvert(_lastAppliedRotateTransform);
-
CGFloat directionRad = self.mapView.direction * M_PI / 180.0;
CATransform3D newRotateTransform = CATransform3DMakeRotation(-directionRad, 0, 0, 1);
- CATransform3D effectiveTransform = CATransform3DConcat(undoOfLastRotateTransform, newRotateTransform);
-
- self.layer.transform = CATransform3DConcat(self.layer.transform, effectiveTransform);
+ self.layer.transform = CATransform3DConcat(CATransform3DIdentity, newRotateTransform);
+
_lastAppliedRotateTransform = newRotateTransform;
}