From 4e808994cb7611090c234875cffc18f0f3ef8088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Wed, 8 Jun 2016 14:25:08 -0700 Subject: [PATCH] [ios] Update annotation views before informing delegate (#5287) On each frame update, update annotation views before informing the delegate of the new frame. This allows the delegate to manipulate annotation views without fear of the SDK overriding those modifications. --- platform/ios/src/MGLMapView.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 5d1bcb110..f5720af66 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -4454,11 +4454,11 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) case mbgl::MapChangeDidFinishRenderingFrame: case mbgl::MapChangeDidFinishRenderingFrameFullyRendered: { + [self updateAnnotationViews]; if ([self.delegate respondsToSelector:@selector(mapViewDidFinishRenderingFrame:fullyRendered:)]) { [self.delegate mapViewDidFinishRenderingFrame:self fullyRendered:(change == mbgl::MapChangeDidFinishRenderingFrameFullyRendered)]; } - [self updateAnnotationViews]; break; } }