summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/ios/MGLMapView.mm17
1 files changed, 11 insertions, 6 deletions
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm
index 5f5e99b0eb..75c06532d2 100644
--- a/platform/ios/MGLMapView.mm
+++ b/platform/ios/MGLMapView.mm
@@ -1151,12 +1151,6 @@ mbgl::DefaultFileSource *mbglFileSource = nullptr;
if (finished)
{
[self notifyMapChange:@(animated ? mbgl::MapChangeRegionDidChangeAnimated : mbgl::MapChangeRegionDidChange)];
-
- [UIView animateWithDuration:MGLAnimationDuration
- animations:^
- {
- self.compass.alpha = 0;
- }];
}
}];
}
@@ -2255,6 +2249,17 @@ CLLocationCoordinate2D latLngToCoordinate(mbgl::LatLng latLng)
}
completion:nil];
}
+ else if (mbglMap->getBearing() == 0 && self.compass.alpha > 0)
+ {
+ [UIView animateWithDuration:MGLAnimationDuration
+ delay:0
+ options:UIViewAnimationOptionBeginFromCurrentState
+ animations:^
+ {
+ self.compass.alpha = 0;
+ }
+ completion:nil];
+ }
}
+ (UIImage *)resourceImageNamed:(NSString *)imageName