summaryrefslogtreecommitdiff
path: root/platform/ios/src/MGLMapView.mm
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-02-09 23:56:25 -0800
committerMinh Nguyễn <mxn@1ec5.org>2016-02-09 23:56:25 -0800
commit2080d1976456bb4e70d657558eab0e4aa7a03605 (patch)
tree45ef2f5f78d6b76672b88cde47036092ac5e2a34 /platform/ios/src/MGLMapView.mm
parent832334128145cb4431b45baf9a8e25d2b8a3eef9 (diff)
downloadqtlocation-mapboxgl-2080d1976456bb4e70d657558eab0e4aa7a03605.tar.gz
[ios] Conform to SMCalloutViewDelegate
#3322 #3456 replaced SMCalloutViewDelegate conformance with MGLCalloutViewDelegate conformance. Unfortunately, the two protocols differ in some symbols. This change restores SMCalloutViewDelegate methods alongside MGLCalloutViewDelegate methods. Fixes #3871.
Diffstat (limited to 'platform/ios/src/MGLMapView.mm')
-rw-r--r--platform/ios/src/MGLMapView.mm9
1 files changed, 9 insertions, 0 deletions
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:)])