Skip to content

CarPlay map fits to previewed route when returning to main map from custom template #2030

Closed

Description

@1ec5

When returning to the main CarPlay map from a route preview via a template other than the search template, the map doesn’t enter course tracking mode and in some cases doesn’t tilt. Without course tracking mode, the camera seems to fit to a route that is no longer being previewed.

unfit

To reproduce in the CarPlay example application:

  1. Tap on the ⭐️ Favorites button in the navigation bar.
  2. Select a favorite to preview.
  3. Return to the favorites list.
  4. Tap Back to return to the main map.
  5. Wait until the navigation bar automatically hides.

The issue doesn’t reproduce when using the search template, because this code in CarPlayManager special-cases CPSearchTemplate:

let isCorrectType = type(of: template) == CPSearchTemplate.self || type(of: template) == CPMapTemplate.self
guard let interface = interfaceController, let top = interface.topTemplate,
type(of: top) == CPSearchTemplate.self || interface.templates.count == 1,
isCorrectType,
let carPlayMapViewController = carPlayMapViewController else { return }
if type(of: template) == CPSearchTemplate.self {
carPlayMapViewController.isOverviewingRoutes = false
}
carPlayMapViewController.resetCamera(animated: false)

/ref #2022
/cc @mapbox/navigation-ios

Activity

  1. added
    bug
    CarPlay
    on Mar 14, 2019
  2. added this to the v0.30.0 milestone on Mar 14, 2019
  3. 1ec5 commented on Mar 22, 2019

    @1ec5
    ContributorAuthor

    Fixed in 2db6225 for #2022.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CarPlaybug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions