[ios] Bring annotation view to front when selected

Fixes #991.
This commit is contained in:
Minh Nguyễn
2016-06-05 13:21:13 -07:00
committed by Minh Nguyễn
parent b3d9e125b1
commit b761aad4e6

View File

@@ -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];
}
}