Protocol

CPMapTemplateDelegate

The protocol an object implements to handle events from a map template.

Declaration

@protocol CPMapTemplateDelegate

Topics

Setting the Display Style

- mapTemplate:displayStyleForManeuver:

Asks the delegate for the maneuver’s display style.

CPManeuverDisplayStyle

A display style that determines the visual layout for a maneuver.

Handling Navigation Events

- mapTemplate:selectedPreviewForTrip:usingRouteChoice:

Tells the delegate that the user selected a trip and route choice to preview.

- mapTemplate:startedTrip:usingRouteChoice:

Tells the delegate that the user selected a trip and route choice to navigate.

- mapTemplateDidCancelNavigation:

Tells the delegate that the system canceled the navigation.

Displaying Notifications

- mapTemplate:shouldShowNotificationForManeuver:

Asks the delegate whether the system should display the maneuver as a notification when the app is in the background.

- mapTemplate:shouldUpdateNotificationForManeuver:withTravelEstimates:

Asks the delegate whether the system should display the maneuver with updated travel estimates as a notification when the app is in the background.

- mapTemplate:shouldShowNotificationForNavigationAlert:

Asks the delegate whether the system should display the navigation alert as a notification when the app is in the background.

Handling Navigation Alerts

- mapTemplate:willShowNavigationAlert:

Tells the delegate that the system will show the navigation alert.

- mapTemplate:didShowNavigationAlert:

Tells the delegate that the system showed the navigation alert.

- mapTemplate:willDismissNavigationAlert:dismissalContext:

Tells the delegate that the system is preparing to dismiss the navigation alert.

- mapTemplate:didDismissNavigationAlert:dismissalContext:

Tells the delegate that the system dismissed the navigation alert.

CPNavigationAlertDismissalContext

A set of reasons for dismissing a navigation alert.

Panning the Map

- mapTemplateDidShowPanningInterface:

Tells the delegate that the panning interface is visible on the map.

- mapTemplateWillDismissPanningInterface:

Tells the delegate that the panning interface will disappear from the map.

- mapTemplateDidDismissPanningInterface:

Tells the delegate that the panning interface is no longer visible on the map.

- mapTemplateDidBeginPanGesture:

Tells the delegate that the pan gesture has started.

- mapTemplate:panBeganWithDirection:

Tells the delegate that the user is starting to pan the map.

- mapTemplate:panWithDirection:

Tells the delegate that the user is panning in a certain direction on the map.

- mapTemplate:panEndedWithDirection:

Tells the delegate that the user stopped panning the map.

CPPanDirection

The directions a user can pan (or move) a map displayed on the CarPlay screen.

- mapTemplate:didEndPanGestureWithVelocity:

Tells the delegate that the pan gesture ended with the specified velocity.

- mapTemplate:didUpdatePanGestureWithTranslation:velocity:

Tells the delegate that the pan gesture changed.

Relationships

Inherits From

See Also

Handling Map Template Events

mapDelegate

The object that serves as the delegate of the map template.