CarPlayMapViewController

open class CarPlayMapViewController : UIViewController
extension CarPlayMapViewController: StyleManagerDelegate
extension CarPlayMapViewController: NavigationMapViewDelegate
extension CarPlayMapViewController: CPSessionConfigurationDelegate

CarPlayMapViewController is responsible for administering the Mapbox map, the interface styles and the map template buttons to display on CarPlay.

Important

Loading CarPlayMapViewController view will start a Free Drive session by default. You can change default behavior using CarPlayMapViewController.startFreeDriveAutomatically property. For more information, see the “Pricing” guide.
  • The map button for recentering the map view if a user action causes it to stop following the user.

    Declaration

    Swift

    public lazy var recenterButton: CPMapButton { get set }
  • The map button for zooming in the current map view.

    Declaration

    Swift

    public lazy var zoomInButton: CPMapButton { get set }
  • The map button for zooming out the current map view.

    Declaration

    Swift

    public lazy var zoomOutButton: CPMapButton { get set }
  • The map button property for hiding or showing the pan map button.

    Declaration

    Swift

    public internal(set) var panMapButton: CPMapButton? { get }
  • The map button property for exiting the pan map mode.

    Declaration

    Swift

    public internal(set) var dismissPanningButton: CPMapButton? { get }
  • Creates a new pan map button for the CarPlay map view controller.

    Declaration

    Swift

    @discardableResult
    public func panningInterfaceDisplayButton(for mapTemplate: CPMapTemplate) -> CPMapButton

    Parameters

    mapTemplate

    The map template available to the pan map button for display.

    Return Value

    CPMapButton instance.

  • Creates a new close button to dismiss the visible panning buttons on the map.

    Declaration

    Swift

    @discardableResult
    public func panningInterfaceDismissalButton(for mapTemplate: CPMapTemplate) -> CPMapButton

    Parameters

    mapTemplate

    The map template available to the pan map button for display.

    Return Value

    CPMapButton instance.