summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2016-07-22 17:49:47 -0400
committerJason Wray <jason@mapbox.com>2016-07-22 18:19:21 -0400
commit09cc87f5930f543ef8a0519843d17b8d3af2e7fb (patch)
treef6ce178a9bdb0e2f722e988e90b0520c5f27054f /platform
parent4b1eeada9eaa416585b8e908265240c409c1368f (diff)
downloadqtlocation-mapboxgl-09cc87f5930f543ef8a0519843d17b8d3af2e7fb.tar.gz
[ios] Do not allow multipoint annotations to be assigned views
Diffstat (limited to 'platform')
-rw-r--r--platform/ios/CHANGELOG.md1
-rw-r--r--platform/ios/src/MGLMapView.mm8
2 files changed, 8 insertions, 1 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index 1bd10eb288..9dc7a7d91d 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 4c3e192c1e..60ba726e4f 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];