Interface CPMapTemplateDelegate


  • public interface CPMapTemplateDelegate
    API-Since: 12.0
    • 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.