CarPlayMapViewControllerDelegate
public protocol CarPlayMapViewControllerDelegate : AnyObject, UnimplementedLogging
The CarPlayMapViewControllerDelegate protocol provides methods for reacting to events during free-drive navigation or route previewing in CarPlayMapViewController.
-
carPlayMapViewController(_:didAdd:pointAnnotationManager:)Default implementationTells the receiver that the final destination
PointAnnotationwas added to theCarPlayMapViewController.Default Implementation
UnimplementedLoggingprints a warning to standard output the first time this method is called.Declaration
Swift
func carPlayMapViewController(_ carPlayMapViewController: CarPlayMapViewController, didAdd finalDestinationAnnotation: PointAnnotation, pointAnnotationManager: PointAnnotationManager)Parameters
carPlayMapViewControllerThe
CarPlayMapViewControllerobject.finalDestinationAnnotationThe point annotation that was added to the map view.
pointAnnotationManagerThe object that manages the point annotation in the map view.
-
carPlayMapViewController(_:routeLineLayerWithIdentifier:sourceIdentifier:)Default implementationAsks the receiver to return a
LineLayerfor 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
UnimplementedLoggingprints 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
carPlayMapViewControllerThe
CarPlayMapViewControllerobject.identifierThe
LineLayeridentifier.sourceIdentifierIdentifier of the source, which contains the route data that this method would style.
Return Value
A
LineLayerthat is applied to the route line. -
carPlayMapViewController(_:routeCasingLineLayerWithIdentifier:sourceIdentifier:)Default implementationAsks the receiver to return a
LineLayerfor 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
UnimplementedLoggingprints 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
carPlayMapViewControllerThe
CarPlayMapViewControllerobject.identifierThe
LineLayeridentifier.sourceIdentifierIdentifier of the source, which contains the route data that this method would style.
Return Value
A
LineLayerthat is applied as a casing around the route line. -
carPlayMapViewController(_:routeRestrictedAreasLineLayerWithIdentifier:sourceIdentifier:)Default implementationAsks the receiver to return a
LineLayerfor highlighting restricted areas portions of the route, 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
UnimplementedLoggingprints a warning to standard output the first time this method is called.Declaration
Swift
func carPlayMapViewController(_ carPlayMapViewController: CarPlayMapViewController, routeRestrictedAreasLineLayerWithIdentifier identifier: String, sourceIdentifier: String) -> LineLayer?Parameters
carPlayMapViewControllerThe
CarPlayMapViewControllerobject.identifierThe
LineLayeridentifier.sourceIdentifierIdentifier of the source, which contains the route data that this method would style.
Return Value
A
LineLayerthat is applied as restricted areas on the route line. -
carPlayMapViewController(_:willAdd:)Default implementationAsks the receiver to adjust the default layer which will be added to the map view and return a
Layer. This method is invoked when the map view loads and any time a layer will be added.Default Implementation
UnimplementedLoggingprints a warning to standard output the first time this method is called.Declaration
Swift
func carPlayMapViewController(_ carPlayMapViewController: CarPlayMapViewController, willAdd layer: Layer) -> Layer?Parameters
carPlayMapViewControllerThe
CarPlayMapViewControllerobject.layerA default
Layergenerated by the carPlayMapViewController.Return Value
A
Layerafter adjusted and will be added to the map view byMapboxNavigation.
Install in Dash
CarPlayMapViewControllerDelegate Protocol Reference