Skip to content

Commit

Permalink
Fix respecting annotationConsumeTapEvents on iOS (#716)
Browse files Browse the repository at this point in the history
  • Loading branch information
pawlowskim authored Oct 25, 2021
1 parent 4c211fb commit 045ea9b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ios/Classes/MapboxMapController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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'")
Expand Down

0 comments on commit 045ea9b

Please sign in to comment.