From b761aad4e62162bd17fbf639146a82281228318f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Sun, 5 Jun 2016 13:21:13 -0700 Subject: [ios] Bring annotation view to front when selected Fixes #991. --- platform/ios/src/MGLMapView.mm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'platform') 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]; } } -- cgit v1.2.1