How to detect the single tap on the map view, I did not find any function for this in MGLMapViewDelegate.
Finally, I found a way to detect it. I write a subclass of the MGLMapView and override the touchEnded function. When you tap on the annotations it only called the touchBegin function. when touching on the map view it called both touchBegin and touchEnded. When touching on the polyline or polygon, it will call the delegate function didSelectAnnotations.