Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[ios] Disable annotation view implicit animation
Browse files Browse the repository at this point in the history
Like #3683, this
change prevents Core Animation from implicitly animating changes to the
annotation's bounds. This is done to reduce lag during map interactions
like pan and drag.
  • Loading branch information
boundsj committed May 6, 2016
1 parent a91b1ac commit da4ca06
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions platform/ios/src/MGLAnnotationView.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,14 @@ @interface MGLAnnotationView ()

@implementation MGLAnnotationView

- (id<CAAction>)actionForLayer:(CALayer *)layer forKey:(NSString *)event
{
// Allow mbgl to drive animation of this view’s bounds.
if ([event isEqualToString:@"bounds"])
{
return [NSNull null];
}
return [super actionForLayer:layer forKey:event];
}

@end

0 comments on commit da4ca06

Please sign in to comment.