diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-06-05 13:21:13 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-06-07 00:53:10 -0700 |
commit | b761aad4e62162bd17fbf639146a82281228318f (patch) | |
tree | 90ad85d43cdf6e21c6a59eb3597bcb37aa175387 /platform | |
parent | b3d9e125b1538f7642b70eb1014afe89208dc419 (diff) | |
download | qtlocation-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.mm | 7 |
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]; } } |