diff options
author | Jordan Kiley <jmkiley@users.noreply.github.com> | 2018-08-20 16:30:03 -0700 |
---|---|---|
committer | Fabian Guerra Soto <fabian.guerra@mapbox.com> | 2018-08-20 16:30:03 -0700 |
commit | 7fc872b797679ae033a32246206efb06c98a0fd5 (patch) | |
tree | 4c0e1f32fdc32ec2d1f94fd1f429765c07389f63 /platform/macos/src/MGLMapView.mm | |
parent | 50059659d100759978c8bebb04ac7beb9e6d618f (diff) | |
download | qtlocation-mapboxgl-7fc872b797679ae033a32246206efb06c98a0fd5.tar.gz |
Add enabled property to MGLShape (#12352)
* [ios, macos] Add -[MGLMapViewDelegate mapView:canSelectAnnotation:] method.
* [ios, macos] Update changelogs.
* [ios, macos] Add mapView:canSelect: integration tests.
* [ios, macos] Change semantics to shape annotations.
* [ios, macos] Update changelogs.
* [ios, macos] Update shapeAnnotationIsEnabled documentation, improve code readability.
Diffstat (limited to 'platform/macos/src/MGLMapView.mm')
-rw-r--r-- | platform/macos/src/MGLMapView.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index 154b716377..3c1fe18499 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -2108,7 +2108,11 @@ public: if ([annotation isKindOfClass:[MGLMultiPoint class]]) { - return false; + if ([self.delegate respondsToSelector:@selector(mapView:shapeAnnotationIsEnabled:)]) { + return !!(![self.delegate mapView:self shapeAnnotationIsEnabled:(MGLMultiPoint *)annotation]); + } else { + return false; + } } MGLAnnotationImage *annotationImage = [self imageOfAnnotationWithTag:annotationTag]; |