mapbox / mapbox/mapbox-navigation-ios

Route shrinks to infinitesimal size after panning out of course tracking in CarPlay

Open
#2,098 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CarPlay
Dominant language
Swift
Stars
918
Forks
326
Avg merge
1h 16m
Merged PRs (30d)
3

Description

If the user starts navigation on CarPlay, pans the map, and waits for the navigation bar to disappear automatically, the map goes into overview mode all by itself and zooms out way too far.

bayarea

`viewSafeAreaInsetsDidChange()` uses `userTrackingMode` to determine whether to apply an edge padding that takes up the entire map for the purpose of anchoring the user puck at a specific location. But this Boolean is insufficient for expressing the third state where we’re neither tracking the user’s location nor in overview mode.

https://github.com/mapbox/mapbox-navigation-ios/blob/4274aced2d02de0d5f416d416aaab3b228d1257b/MapboxNavigation/CarPlayNavigationViewController.swift#L190-L193

#2097 and #2048 have pretty much the same root cause. It may be time to finally revisit #1741.

/cc @mapbox/navigation-ios

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in CarPlayNavigationViewController.swift around lines 190-193 and trace how viewSafeAreaInsetsDidChange() uses userTrackingMode during CarPlay navigation. Compare the related root-cause reports in #2097, #2048, and #1741, then reproduce the panning and navigation-bar dismissal sequence. Done means the route no longer shrinks to an unusably small size or zooms out unexpectedly.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.