summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--platform/ios/src/MGLMapView.mm9
2 files changed, 10 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f49b766f42..418d5c1ce7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -53,6 +53,7 @@ Known issues:
- Corrected the dynamic framework’s minimum deployment target to iOS 8.0. ([#3872](https://github.com/mapbox/mapbox-gl-native/pull/3872))
- Fixed Fabric compatibility. ([#3847](https://github.com/mapbox/mapbox-gl-native/pull/3847))
+- Fixed an issue preventing `-[MGLMapViewDelegate mapView:tapOnCalloutForAnnotation:]` from being called when a non-custom callout view is tapped. ([#3875](https://github.com/mapbox/mapbox-gl-native/pull/3875))
## iOS 3.1.0
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 126328b5fd..2040c40da5 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -147,6 +147,7 @@ public:
GLKViewDelegate,
CLLocationManagerDelegate,
UIActionSheetDelegate,
+ SMCalloutViewDelegate,
MGLCalloutViewDelegate,
UIAlertViewDelegate,
MGLMultiPointDelegate,
@@ -1482,6 +1483,14 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
return [self.delegate respondsToSelector:@selector(mapView:tapOnCalloutForAnnotation:)];
}
+- (void)calloutViewClicked:(__unused SMCalloutView *)calloutView
+{
+ if ([self.delegate respondsToSelector:@selector(mapView:tapOnCalloutForAnnotation:)])
+ {
+ [self.delegate mapView:self tapOnCalloutForAnnotation:self.selectedAnnotation];
+ }
+}
+
- (void)calloutViewTapped:(__unused MGLCompactCalloutView *)calloutView
{
if ([self.delegate respondsToSelector:@selector(mapView:tapOnCalloutForAnnotation:)])