Package apple.carplay.protocol
Interface CPMapTemplateDelegate
-
public interface CPMapTemplateDelegate
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidmapTemplateDidBeginPanGesture(CPMapTemplate mapTemplate)Called when a pan gesture begins.default voidmapTemplateDidCancelNavigation(CPMapTemplate mapTemplate)Called when navigation has been canceled by the system.default voidmapTemplateDidDismissNavigationAlertDismissalContext(CPMapTemplate mapTemplate, CPNavigationAlert navigationAlert, long dismissalContext)Called when the map interface has completed dismissal of a navigation alert.default voidmapTemplateDidDismissPanningInterface(CPMapTemplate mapTemplate)This will be called when the pan interface disappears on the map interface.default voidmapTemplateDidEndPanGestureWithVelocity(CPMapTemplate mapTemplate, CGPoint velocity)Called when a pan gesture ends.default voidmapTemplateDidShowNavigationAlert(CPMapTemplate mapTemplate, CPNavigationAlert navigationAlert)Called when the map interface has displayed a navigation alert.default voidmapTemplateDidShowPanningInterface(CPMapTemplate mapTemplate)This will be called when the pan interface appears on the map interface.default voidmapTemplateDidUpdatePanGestureWithTranslationVelocity(CPMapTemplate mapTemplate, CGPoint translation, CGPoint velocity)Called when a pan gesture changes.default longmapTemplateDisplayStyleForManeuver(CPMapTemplate mapTemplate, CPManeuver maneuver)Changes the visual layout of the maneuver.default voidmapTemplatePanBeganWithDirection(CPMapTemplate mapTemplate, long direction)Called when a pan button is pressed/selected for an extended duration.default voidmapTemplatePanEndedWithDirection(CPMapTemplate mapTemplate, long direction)Called when a pan button is released after an extended duration.default voidmapTemplatePanWithDirection(CPMapTemplate mapTemplate, long direction)Called when a pan button is pressed/selected momentarily.default voidmapTemplateSelectedPreviewForTripUsingRouteChoice(CPMapTemplate mapTemplate, CPTrip trip, CPRouteChoice routeChoice)Called when the user has selected a route choice to preview.default booleanmapTemplateShouldShowNotificationForManeuver(CPMapTemplate mapTemplate, CPManeuver maneuver)Determines if the maneuver should be presented as a notification when the app is in the background.default booleanmapTemplateShouldShowNotificationForNavigationAlert(CPMapTemplate mapTemplate, CPNavigationAlert navigationAlert)Determines if the navigation alert should be presented as a notification when the app is in the background.default booleanmapTemplateShouldUpdateNotificationForManeuverWithTravelEstimates(CPMapTemplate mapTemplate, CPManeuver maneuver, CPTravelEstimates travelEstimates)Determines if the updated distance remaining for the maneuver should be presented as a notification when the app is in the background.default voidmapTemplateStartedTripUsingRouteChoice(CPMapTemplate mapTemplate, CPTrip trip, CPRouteChoice routeChoice)Called when the user has selected a route choice to navigate.default voidmapTemplateWillDismissNavigationAlertDismissalContext(CPMapTemplate mapTemplate, CPNavigationAlert navigationAlert, long dismissalContext)Called when the map interface is preparing to dismiss a navigation alert.default voidmapTemplateWillDismissPanningInterface(CPMapTemplate mapTemplate)This will be called when the pan interface will disappear on the map interface.default voidmapTemplateWillShowNavigationAlert(CPMapTemplate mapTemplate, CPNavigationAlert navigationAlert)Called when the map interface is about to display a navigation alert.
-
-
-
Method Detail
-
mapTemplateDidDismissNavigationAlertDismissalContext
default void mapTemplateDidDismissNavigationAlertDismissalContext(CPMapTemplate mapTemplate, CPNavigationAlert navigationAlert, long dismissalContext)
Called when the map interface has completed dismissal of a navigation alert.
-
mapTemplateDidEndPanGestureWithVelocity
default void mapTemplateDidEndPanGestureWithVelocity(CPMapTemplate mapTemplate, CGPoint velocity)
Called when a pan gesture ends. May not be called when connected to some CarPlay systems.
-
mapTemplateDidShowNavigationAlert
default void mapTemplateDidShowNavigationAlert(CPMapTemplate mapTemplate, CPNavigationAlert navigationAlert)
Called when the map interface has displayed a navigation alert. To take action in response to button presses on the navigation alert, see -[CPAlertAction handler].
-
mapTemplateDidUpdatePanGestureWithTranslationVelocity
default void mapTemplateDidUpdatePanGestureWithTranslationVelocity(CPMapTemplate mapTemplate, CGPoint translation, CGPoint velocity)
Called when a pan gesture changes. May not be called when connected to some CarPlay systems.
-
mapTemplateDisplayStyleForManeuver
default long mapTemplateDisplayStyleForManeuver(CPMapTemplate mapTemplate, CPManeuver maneuver)
Changes the visual layout of the maneuver.- Returns:
- a CPManeuverDisplayStyle value representing the style to be used for displaying the maneuver
-
mapTemplatePanBeganWithDirection
default void mapTemplatePanBeganWithDirection(CPMapTemplate mapTemplate, long direction)
Called when a pan button is pressed/selected for an extended duration.
-
mapTemplatePanEndedWithDirection
default void mapTemplatePanEndedWithDirection(CPMapTemplate mapTemplate, long direction)
Called when a pan button is released after an extended duration.
-
mapTemplatePanWithDirection
default void mapTemplatePanWithDirection(CPMapTemplate mapTemplate, long direction)
Called when a pan button is pressed/selected momentarily.
-
mapTemplateSelectedPreviewForTripUsingRouteChoice
default void mapTemplateSelectedPreviewForTripUsingRouteChoice(CPMapTemplate mapTemplate, CPTrip trip, CPRouteChoice routeChoice)
Called when the user has selected a route choice to preview.
-
mapTemplateShouldShowNotificationForManeuver
default boolean mapTemplateShouldShowNotificationForManeuver(CPMapTemplate mapTemplate, CPManeuver maneuver)
Determines if the maneuver should be presented as a notification when the app is in the background.- Returns:
- YES if the maneuver should appear as a notification, otherwise NO
-
mapTemplateShouldShowNotificationForNavigationAlert
default boolean mapTemplateShouldShowNotificationForNavigationAlert(CPMapTemplate mapTemplate, CPNavigationAlert navigationAlert)
Determines if the navigation alert should be presented as a notification when the app is in the background.- Returns:
- YES if the alert should appear as a notification, otherwise NO
-
mapTemplateShouldUpdateNotificationForManeuverWithTravelEstimates
default boolean mapTemplateShouldUpdateNotificationForManeuverWithTravelEstimates(CPMapTemplate mapTemplate, CPManeuver maneuver, CPTravelEstimates travelEstimates)
Determines if the updated distance remaining for the maneuver should be presented as a notification when the app is in the background.- Returns:
- YES if the updated estimates should appear in the notification, otherwise NO
-
mapTemplateStartedTripUsingRouteChoice
default void mapTemplateStartedTripUsingRouteChoice(CPMapTemplate mapTemplate, CPTrip trip, CPRouteChoice routeChoice)
Called when the user has selected a route choice to navigate.
-
mapTemplateWillDismissNavigationAlertDismissalContext
default void mapTemplateWillDismissNavigationAlertDismissalContext(CPMapTemplate mapTemplate, CPNavigationAlert navigationAlert, long dismissalContext)
Called when the map interface is preparing to dismiss a navigation alert.
-
mapTemplateWillShowNavigationAlert
default void mapTemplateWillShowNavigationAlert(CPMapTemplate mapTemplate, CPNavigationAlert navigationAlert)
Called when the map interface is about to display a navigation alert.
-
mapTemplateDidBeginPanGesture
default void mapTemplateDidBeginPanGesture(CPMapTemplate mapTemplate)
Called when a pan gesture begins. May not be called when connected to some CarPlay systems.
-
mapTemplateDidCancelNavigation
default void mapTemplateDidCancelNavigation(CPMapTemplate mapTemplate)
Called when navigation has been canceled by the system. [@note] In CarPlay systems that have native navigation, it is expected that only either the native navigation or the iPhone can be actively navigating. When navigation begins in the native system, all CarPlay supported navigation apps that are actively navigating will need to end their navigation session.
-
mapTemplateDidDismissPanningInterface
default void mapTemplateDidDismissPanningInterface(CPMapTemplate mapTemplate)
This will be called when the pan interface disappears on the map interface.
-
mapTemplateDidShowPanningInterface
default void mapTemplateDidShowPanningInterface(CPMapTemplate mapTemplate)
This will be called when the pan interface appears on the map interface.
-
mapTemplateWillDismissPanningInterface
default void mapTemplateWillDismissPanningInterface(CPMapTemplate mapTemplate)
This will be called when the pan interface will disappear on the map interface.
-
-