diff options
Diffstat (limited to 'platform/ios/src/MGLAnnotationView.mm')
-rw-r--r-- | platform/ios/src/MGLAnnotationView.mm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/platform/ios/src/MGLAnnotationView.mm b/platform/ios/src/MGLAnnotationView.mm index 02e3d96e08..74d3908077 100644 --- a/platform/ios/src/MGLAnnotationView.mm +++ b/platform/ios/src/MGLAnnotationView.mm @@ -54,7 +54,7 @@ _annotation = [decoder decodeObjectOfClass:[NSObject class] forKey:@"annotation"]; _centerOffset = [decoder decodeCGVectorForKey:@"centerOffset"]; _scalesWithViewingDistance = [decoder decodeBoolForKey:@"scalesWithViewingDistance"]; - _rotatesWithMap = [decoder decodeBoolForKey:@"rotatesWithMap"]; + _rotatesToMatchCamera = [decoder decodeBoolForKey:@"rotatesToMatchCamera"]; _selected = [decoder decodeBoolForKey:@"selected"]; _enabled = [decoder decodeBoolForKey:@"enabled"]; self.draggable = [decoder decodeBoolForKey:@"draggable"]; @@ -68,7 +68,7 @@ [coder encodeObject:_annotation forKey:@"annotation"]; [coder encodeCGVector:_centerOffset forKey:@"centerOffset"]; [coder encodeBool:_scalesWithViewingDistance forKey:@"scalesWithViewingDistance"]; - [coder encodeBool:_rotatesWithMap forKey:@"rotatesWithMap"]; + [coder encodeBool:_rotatesToMatchCamera forKey:@"rotatesToMatchCamera"]; [coder encodeBool:_selected forKey:@"selected"]; [coder encodeBool:_enabled forKey:@"enabled"]; [coder encodeBool:_draggable forKey:@"draggable"]; @@ -160,18 +160,18 @@ } } -- (void)setRotatesWithMap:(BOOL)rotatesWithMap +- (void)setRotatesToMatchCamera:(BOOL)rotatesToMatchCamera { - if (_rotatesWithMap != rotatesWithMap) + if (_rotatesToMatchCamera != rotatesToMatchCamera) { - _rotatesWithMap = rotatesWithMap; + _rotatesToMatchCamera = rotatesToMatchCamera; [self updateRotateTransform]; } } - (void)updateRotateTransform { - if (self.rotatesWithMap == NO) return; + if (self.rotatesToMatchCamera == NO) return; CATransform3D undoOfLastRotateTransform = CATransform3DInvert(_lastAppliedRotateTransform); |