             return
         }
 
-        if view.isKind(of: MKPinAnnotationView.self) {
+        let defaultPin: Bool
+        if #available(iOS 11.0, *) {
+            defaultPin = view.isKind(of: MKMarkerAnnotationView.self)
+        } else {
+            defaultPin = false
+        }
+
+        if defaultPin || view.isKind(of: MKPinAnnotationView.self) {
             mapView.removeOverlays(mapView.overlays)
 
             let request = MKDirectionsRequest()

    // MARK: Directions

    public func mapView(_: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer {
        if let polylineOverlay = overlay as? MKPolyline {
            let renderer = MKPolylineRenderer(polyline: polylineOverlay)
            renderer.strokeColor = UIColor.blue


public class GPointAnnotation: MKPointAnnotation {
    private var onClick: ((GPointAnnotation) -> Void)?

    public func coordinate(_ coordinate: CLLocationCoordinate2D) -> Self {
        self.coordinate = coordinate
