From 09cc87f5930f543ef8a0519843d17b8d3af2e7fb Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Fri, 22 Jul 2016 17:49:47 -0400 Subject: [PATCH] [ios] Do not allow multipoint annotations to be assigned views --- platform/ios/CHANGELOG.md | 1 + platform/ios/src/MGLMapView.mm | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 1bd10eb28..9dc7a7d91 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -11,6 +11,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CON * Improved the performance of relocating a non-view-backed point annotation by changing its `coordinate` property. ([#5385](https://github.com/mapbox/mapbox-gl-native/pull/5385)) * MGLMapDebugOverdrawVisualizationMask does nothing in Release builds of the SDK. This is disabled for performance reasons. ([#5555](https://github.com/mapbox/mapbox-gl-native/pull/5555)) * Include simulator architecture slices in the dSYM file that is generated for release builds. ([#5740](https://github.com/mapbox/mapbox-gl-native/pull/5740)) +* Fixed an issue where annotation views could be assigned to multipoint annotations. ([#5770](https://github.com/mapbox/mapbox-gl-native/pull/5770)) ## 3.3.1 diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 4c3e192c1..60ba726e4 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -4547,7 +4547,13 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) MGLAnnotationContext &annotationContext = pair.second; MGLAnnotationView *annotationView = annotationContext.annotationView; - + + // Defer to the shape/polygon styling delegate methods + if ([annotationContext.annotation isKindOfClass:[MGLMultiPoint class]]) + { + continue; + } + if (!annotationView) { MGLAnnotationView *annotationView = [self annotationViewForAnnotation:annotationContext.annotation];