summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/ios/src/MGLMapView.mm7
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 74e2f1e73e..bd8762c475 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -3395,10 +3395,13 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
{
MGLAnnotationContext &annotationContext = _annotationContextsByAnnotationTag.at(annotationTag);
- if (annotationContext.annotationView)
+ MGLAnnotationView *annotationView = annotationContext.annotationView;
+ if (annotationView)
{
// Annotations represented by views use the view frame as the positioning rect.
- positioningRect = annotationContext.annotationView.frame;
+ positioningRect = annotationView.frame;
+
+ [annotationView.superview bringSubviewToFront:annotationView];
}
}