summaryrefslogtreecommitdiff
path: root/platform/ios/src/MGLMapView.mm
diff options
context:
space:
mode:
authorJordan Kiley <jmkiley@users.noreply.github.com>2018-08-20 16:30:03 -0700
committerFabian Guerra Soto <fabian.guerra@mapbox.com>2018-08-20 16:30:03 -0700
commit7fc872b797679ae033a32246206efb06c98a0fd5 (patch)
tree4c0e1f32fdc32ec2d1f94fd1f429765c07389f63 /platform/ios/src/MGLMapView.mm
parent50059659d100759978c8bebb04ac7beb9e6d618f (diff)
downloadqtlocation-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/ios/src/MGLMapView.mm')
-rw-r--r--platform/ios/src/MGLMapView.mm6
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 2a231838a4..8ca41b328c 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -4183,7 +4183,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];