Package apple.carplay.protocol
Interface CPMapTemplateDelegate
-
public interface CPMapTemplateDelegateAPI-Since: 12.0
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidmapTemplateDidBeginPanGesture(@NotNull CPMapTemplate mapTemplate)Called when a pan gesture begins.default voidmapTemplateDidCancelNavigation(@NotNull CPMapTemplate mapTemplate)Called when navigation has been canceled by the system.default voidmapTemplateDidDismissNavigationAlertDismissalContext(@NotNull CPMapTemplate mapTemplate, @NotNull CPNavigationAlert navigationAlert, long dismissalContext)Called when the map interface has completed dismissal of a navigation alert.default voidmapTemplateDidDismissPanningInterface(@NotNull CPMapTemplate mapTemplate)This will be called when the pan interface disappears on the map interface.default voidmapTemplateDidEndPanGestureWithVelocity(@NotNull CPMapTemplate mapTemplate, CGPoint velocity)Called when a pan gesture ends.default voidmapTemplateDidShowNavigationAlert(@NotNull CPMapTemplate mapTemplate, @NotNull CPNavigationAlert navigationAlert)Called when the map interface has displayed a navigation alert.default voidmapTemplateDidShowPanningInterface(@NotNull CPMapTemplate mapTemplate)This will be called when the pan interface appears on the map interface.default voidmapTemplateDidUpdatePanGestureWithTranslationVelocity(@NotNull CPMapTemplate mapTemplate, CGPoint translation, CGPoint velocity)Called when a pan gesture changes.default longmapTemplateDisplayStyleForManeuver(@NotNull CPMapTemplate mapTemplate, @NotNull CPManeuver maneuver)Changes the visual layout of the maneuver.default voidmapTemplatePanBeganWithDirection(@NotNull CPMapTemplate mapTemplate, long direction)Called when a pan button is pressed/selected for an extended duration.default voidmapTemplatePanEndedWithDirection(@NotNull CPMapTemplate mapTemplate, long direction)Called when a pan button is released after an extended duration.default voidmapTemplatePanWithDirection(@NotNull CPMapTemplate mapTemplate, long direction)Called when a pan button is pressed/selected momentarily.default voidmapTemplateSelectedPreviewForTripUsingRouteChoice(@NotNull CPMapTemplate mapTemplate, @NotNull CPTrip trip, @NotNull CPRouteChoice routeChoice)Called when the user has selected a route choice to preview.default booleanmapTemplateShouldShowNotificationForManeuver(@NotNull CPMapTemplate mapTemplate, @NotNull CPManeuver maneuver)Determines if the maneuver should be presented as a notification when the app is in the background.default booleanmapTemplateShouldShowNotificationForNavigationAlert(@NotNull CPMapTemplate mapTemplate, @NotNull CPNavigationAlert navigationAlert)Determines if the navigation alert should be presented as a notification when the app is in the background.default booleanmapTemplateShouldUpdateNotificationForManeuverWithTravelEstimates(@NotNull CPMapTemplate mapTemplate, @NotNull CPManeuver maneuver, @NotNull 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(@NotNull CPMapTemplate mapTemplate, @NotNull CPTrip trip, @NotNull CPRouteChoice routeChoice)Called when the user has selected a route choice to navigate.default voidmapTemplateWillDismissNavigationAlertDismissalContext(@NotNull CPMapTemplate mapTemplate, @NotNull CPNavigationAlert navigationAlert, long dismissalContext)Called when the map interface is preparing to dismiss a navigation alert.default voidmapTemplateWillDismissPanningInterface(@NotNull CPMapTemplate mapTemplate)This will be called when the pan interface will disappear on the map interface.default voidmapTemplateWillShowNavigationAlert(@NotNull CPMapTemplate mapTemplate, @NotNull CPNavigationAlert navigationAlert)Called when the map interface is about to display a navigation alert.
-
-
-
Method Detail
-
mapTemplateDidDismissNavigationAlertDismissalContext
default void mapTemplateDidDismissNavigationAlertDismissalContext(@NotNull @NotNull CPMapTemplate mapTemplate, @NotNull @NotNull CPNavigationAlert navigationAlert, long dismissalContext)Called when the map interface has completed dismissal of a navigation alert.
-
mapTemplateDidEndPanGestureWithVelocity
default void mapTemplateDidEndPanGestureWithVelocity(@NotNull @NotNull CPMapTemplate mapTemplate, CGPoint velocity)Called when a pan gesture ends. May not be called when connected to some CarPlay systems.
-
mapTemplateDidShowNavigationAlert
default void mapTemplateDidShowNavigationAlert(@NotNull @NotNull CPMapTemplate mapTemplate, @NotNull @NotNull 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(@NotNull @NotNull 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(@NotNull @NotNull CPMapTemplate mapTemplate, @NotNull @NotNull 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(@NotNull @NotNull CPMapTemplate mapTemplate, long direction)Called when a pan button is pressed/selected for an extended duration.
-
mapTemplatePanEndedWithDirection
default void mapTemplatePanEndedWithDirection(@NotNull @NotNull CPMapTemplate mapTemplate, long direction)Called when a pan button is released after an extended duration.
-
mapTemplatePanWithDirection
default void mapTemplatePanWithDirection(@NotNull @NotNull CPMapTemplate mapTemplate, long direction)Called when a pan button is pressed/selected momentarily.
-
mapTemplateSelectedPreviewForTripUsingRouteChoice
default void mapTemplateSelectedPreviewForTripUsingRouteChoice(@NotNull @NotNull CPMapTemplate mapTemplate, @NotNull @NotNull CPTrip trip, @NotNull @NotNull CPRouteChoice routeChoice)Called when the user has selected a route choice to preview.
-
mapTemplateShouldShowNotificationForManeuver
default boolean mapTemplateShouldShowNotificationForManeuver(@NotNull @NotNull CPMapTemplate mapTemplate, @NotNull @NotNull 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(@NotNull @NotNull CPMapTemplate mapTemplate, @NotNull @NotNull 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(@NotNull @NotNull CPMapTemplate mapTemplate, @NotNull @NotNull CPManeuver maneuver, @NotNull @NotNull 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(@NotNull @NotNull CPMapTemplate mapTemplate, @NotNull @NotNull CPTrip trip, @NotNull @NotNull CPRouteChoice routeChoice)Called when the user has selected a route choice to navigate.
-
mapTemplateWillDismissNavigationAlertDismissalContext
default void mapTemplateWillDismissNavigationAlertDismissalContext(@NotNull @NotNull CPMapTemplate mapTemplate, @NotNull @NotNull CPNavigationAlert navigationAlert, long dismissalContext)Called when the map interface is preparing to dismiss a navigation alert.
-
mapTemplateWillShowNavigationAlert
default void mapTemplateWillShowNavigationAlert(@NotNull @NotNull CPMapTemplate mapTemplate, @NotNull @NotNull CPNavigationAlert navigationAlert)Called when the map interface is about to display a navigation alert.
-
mapTemplateDidBeginPanGesture
default void mapTemplateDidBeginPanGesture(@NotNull @NotNull CPMapTemplate mapTemplate)Called when a pan gesture begins. May not be called when connected to some CarPlay systems.
-
mapTemplateDidCancelNavigation
default void mapTemplateDidCancelNavigation(@NotNull @NotNull 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(@NotNull @NotNull CPMapTemplate mapTemplate)This will be called when the pan interface disappears on the map interface.
-
mapTemplateDidShowPanningInterface
default void mapTemplateDidShowPanningInterface(@NotNull @NotNull CPMapTemplate mapTemplate)This will be called when the pan interface appears on the map interface.
-
mapTemplateWillDismissPanningInterface
default void mapTemplateWillDismissPanningInterface(@NotNull @NotNull CPMapTemplate mapTemplate)This will be called when the pan interface will disappear on the map interface.
-
-