summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-06-05 13:21:13 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-06-07 00:53:10 -0700
commitb761aad4e62162bd17fbf639146a82281228318f (patch)
tree90ad85d43cdf6e21c6a59eb3597bcb37aa175387 /platform
parentb3d9e125b1538f7642b70eb1014afe89208dc419 (diff)
downloadqtlocation-mapboxgl-b761aad4e62162bd17fbf639146a82281228318f.tar.gz
[ios] Bring annotation view to front when selected
Fixes #991.
Diffstat (limited to 'platform')
-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];
}
}