Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more turn lane configurations #2882

Merged
merged 5 commits into from
Apr 6, 2021
Merged

Add more turn lane configurations #2882

merged 5 commits into from
Apr 6, 2021

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented Mar 23, 2021

LaneView now supports the additional turn lane icon assets introduced in mapbox/navigation-ui-resources#21, including the combination U-turn–left turn that’s so common in the iOS simulator’s home of Cupertino:

uturn

As seen in the screenshot, some of the wider U-turn-laden icons get cropped even though they don’t bleed over the edge of the canvas in PaintCode. It’s probably a layout issue in LaneView or LanesView. (Ignore the fact that the number 2 lane is highlighted as a valid lane; that seems to be a bug in OSRM that isn’t present in a Valhalla-based Directions API endpoint. I’m guessing OSRM isn’t recognizing the divided intersection, so it thinks there are two very closely spaced left turns, the first of which can use either left turn lane.)

Unfortunately, I was unable to meaningfully update LaneViewTests, because it’s part of MapboxNavigationTests, which don’t run as part of SPM builds due to #2791 and don’t run as part of Carthage builds due to a lack of support for Carthage in MapboxNavigation. All I was able to do there was to incorporate some renames that took place internally in LaneView, but there are no test cases to exercise the new assets.

More to come:

  • Import a new LanesStyleKit from PaintCode
  • Remove limitations on the output of LaneIndication.ranked(favoring:)
  • Add cases to LaneConfiguration that reflect the expanded repertoire of assets
  • Add cases to LaneView.draw(_:) for calling the new LanesStyleKit methods
  • Consolidate similar cases in LaneConfiguration(rankedIndications:drivingSide:)
  • Update LaneViewTests
  • Fix cropping of some of the wider icons
  • Update the changelog

Fixes #576.

/cc @mapbox/navigation-ios @abhishek1508 @avi-c

@1ec5 1ec5 added bug Something isn’t working op-ex Refactoring, Tech Debt or any other operational excellence work. topic: instructions labels Mar 23, 2021
@1ec5 1ec5 added this to the v2.0.0 (RC) milestone Mar 23, 2021
@1ec5 1ec5 self-assigned this Mar 23, 2021
@1ec5

This comment has been minimized.

@avi-c
Copy link
Contributor

avi-c commented Apr 5, 2021

I have verified that the dual-use icons are now composited correctly and that the "slight" turn variants are shown correctly. I haven't been able to verify all the combinations in the simulator, but I believe we can merge this and deal with any specific issues as they pop up.

@1ec5 1ec5 requested a review from avi-c April 5, 2021 17:05
Copy link
Contributor

@avi-c avi-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passes my test cases and the code looks good. Hopefully we can simplify this soon using additional context from the Directions API.

1ec5 added 4 commits April 5, 2021 18:21
Exported a new version of LanesStyleKit from PaintCode.
Added cases to LaneView for drawing the new sharp turn, dual use, and triple use configurations.
@1ec5 1ec5 merged commit 7d787f3 into release-v2.0 Apr 6, 2021
@1ec5 1ec5 deleted the 1ec5-lane-combos-576 branch April 6, 2021 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working op-ex Refactoring, Tech Debt or any other operational excellence work. topic: instructions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants