CarPlayMapViewControllerDelegate

@available(iOS 12.0, *)
public protocol CarPlayMapViewControllerDelegate : AnyObject, UnimplementedLogging

The CarPlayMapViewControllerDelegate protocol provides methods for reacting to events during free-drive navigation or route previewing in CarPlayMapViewController.

  • Tells the receiver that the final destination PointAnnotation was added to the CarPlayMapViewController.

    Default Implementation

    UnimplementedLogging prints a warning to standard output the first time this method is called.

    Declaration

    Swift

    func carPlayMapViewController(_ carPlayMapViewController: CarPlayMapViewController,
                                  didAdd finalDestinationAnnotation: PointAnnotation,
                                  pointAnnotationManager: PointAnnotationManager)

    Parameters

    carPlayMapViewController
    finalDestinationAnnotation

    The point annotation that was added to the map view.

    pointAnnotationManager

    The object that manages the point annotation in the map view.

  • Asks the receiver to return a LineLayer for the route line, given a layer identifier and a source identifier. This method is invoked when the map view loads and any time routes are added.

    Default Implementation

    UnimplementedLogging prints a warning to standard output the first time this method is called.

    Declaration

    Swift

    func carPlayMapViewController(_ carPlayMapViewController: CarPlayMapViewController,
                                  routeLineLayerWithIdentifier identifier: String,
                                  sourceIdentifier: String) -> LineLayer?

    Parameters

    carPlayMapViewController
    identifier

    The LineLayer identifier.

    sourceIdentifier

    Identifier of the source, which contains the route data that this method would style.

    Return Value

    A LineLayer that is applied to the route line.

  • Asks the receiver to return a LineLayer for the casing layer that surrounds route line, given a layer identifier and a source identifier. This method is invoked when the map view loads and any time routes are added.

    Default Implementation

    UnimplementedLogging prints a warning to standard output the first time this method is called.

    Declaration

    Swift

    func carPlayMapViewController(_ carPlayMapViewController: CarPlayMapViewController,
                                  routeCasingLineLayerWithIdentifier identifier: String,
                                  sourceIdentifier: String) -> LineLayer?

    Parameters

    carPlayMapViewController
    identifier

    The LineLayer identifier.

    sourceIdentifier

    Identifier of the source, which contains the route data that this method would style.

    Return Value

    A LineLayer that is applied as a casing around the route line.