From 045ea9b2fb1e75d0cf500eb4aa38d640659fdddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Paw=C5=82owski?= Date: Mon, 25 Oct 2021 21:29:51 +0200 Subject: [PATCH] Fix respecting annotationConsumeTapEvents on iOS (#716) --- ios/Classes/MapboxMapController.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ios/Classes/MapboxMapController.swift b/ios/Classes/MapboxMapController.swift index 73482bbb7..a087ccb55 100644 --- a/ios/Classes/MapboxMapController.swift +++ b/ios/Classes/MapboxMapController.swift @@ -854,19 +854,19 @@ class MapboxMapController: NSObject, FlutterPlatformView, MGLMapViewDelegate, Ma switch annotationType { case "AnnotationType.fill": fillAnnotationController = MGLPolygonAnnotationController(mapView: self.mapView) - fillAnnotationController!.annotationsInteractionEnabled = true + fillAnnotationController!.annotationsInteractionEnabled = annotationConsumeTapEvents.contains("AnnotationType.fill") fillAnnotationController?.delegate = self case "AnnotationType.line": lineAnnotationController = MGLLineAnnotationController(mapView: self.mapView) - lineAnnotationController!.annotationsInteractionEnabled = true + lineAnnotationController!.annotationsInteractionEnabled = annotationConsumeTapEvents.contains("AnnotationType.line") lineAnnotationController?.delegate = self case "AnnotationType.circle": circleAnnotationController = MGLCircleAnnotationController(mapView: self.mapView) - circleAnnotationController!.annotationsInteractionEnabled = true + circleAnnotationController!.annotationsInteractionEnabled = annotationConsumeTapEvents.contains("AnnotationType.circle") circleAnnotationController?.delegate = self case "AnnotationType.symbol": symbolAnnotationController = MGLSymbolAnnotationController(mapView: self.mapView) - symbolAnnotationController!.annotationsInteractionEnabled = true + symbolAnnotationController!.annotationsInteractionEnabled = annotationConsumeTapEvents.contains("AnnotationType.symbol") symbolAnnotationController?.delegate = self default: print("Unknown annotation type: \(annotationType), must be either 'fill', 'line', 'circle' or 'symbol'")