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

Hide portions of the route that the user has passed #2377

Merged
merged 27 commits into from
Jun 25, 2020
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
cf0b63e
Remove addCongestion
captainbarbosa Jun 15, 2020
25fcd74
More testing
captainbarbosa Jun 16, 2020
1d5bb1c
Vanish route line
captainbarbosa Jun 17, 2020
ad51cae
First refactor
captainbarbosa Jun 17, 2020
48c2800
Add route casing back
captainbarbosa Jun 17, 2020
055bd3e
Fix vanishing route casing
captainbarbosa Jun 17, 2020
61c3278
Update NavigationMapView.swift
captainbarbosa Jun 18, 2020
b108792
Rename SourceIdentifier.route
captainbarbosa Jun 18, 2020
5cfe0b5
Rename StyleLayerIdentifier constants
captainbarbosa Jun 18, 2020
6d2d234
Implement mainRouteStyleLayerWithIdentifier delegate
captainbarbosa Jun 18, 2020
5d3a00c
Implement mainRouteCasingStyleLayerWithIdentifier delegate
captainbarbosa Jun 18, 2020
e12a3e5
Implement alternateRouteStyleLayerWithIdentifier delegate
captainbarbosa Jun 19, 2020
c6477f7
Implement alternateRouteCasingStyleLayerWithIdentifier delegate
captainbarbosa Jun 19, 2020
b0295a0
Remove routeStyleLayerWithIdentifier/routeCasingStyleLayerWithIdentif…
captainbarbosa Jun 19, 2020
d07ac38
Fill out docs
captainbarbosa Jun 19, 2020
99f2c4f
Refactor, make vanishing color customizable
captainbarbosa Jun 19, 2020
8440ff4
Update DayStyle.swift
captainbarbosa Jun 19, 2020
5007d44
Update CHANGELOG.md
captainbarbosa Jun 19, 2020
a758912
Little refactoring
captainbarbosa Jun 22, 2020
27a102d
Make vanishing route opt-in
captainbarbosa Jun 23, 2020
d82f746
Merge branch 'release-v1.0-pre-registry' into nb/vanishing-route-line
captainbarbosa Jun 24, 2020
db5f27d
Merge pull request #2418 from mapbox/nb/vanishing-route-line-2
captainbarbosa Jun 24, 2020
f8915e2
Update NavigationMapView.swift
captainbarbosa Jun 24, 2020
fc8574f
Update CHANGELOG.md
captainbarbosa Jun 24, 2020
32e0d32
Change property name from vanishingRouteColor → traversedRouteColor
captainbarbosa Jun 24, 2020
3da9452
Rename fadesRouteDuringNavigation → routeLineTracksTraversal
captainbarbosa Jun 24, 2020
86b6862
Final feedback edits
captainbarbosa Jun 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
* Merge instructions now indicate whether to merge to the left or the right, as when navigating online. ([valhalla/valhalla#1892](https://github.com/valhalla/valhalla/pull/1892), [valhalla/valhalla#1989](https://github.com/valhalla/valhalla/pull/1989))
* Fixed an issue where spoken and visual instructions sometimes omitted the cardinal direction after a route number in the United States. ([valhalla/valhalla#1917](https://github.com/valhalla/valhalla/pull/1917))
* A spoken instruction about an exit ramp no longer specifies the side of the road if the ramp branches off the slow lane (on the right side in regions that drive on the right). ([valhalla/valhalla#1990](https://github.com/valhalla/valhalla/pull/1990))
* Removed `NavigationMapViewDelegate.navigationMapView(_:routeStyleLayerWithIdentifier:source:)`, `NavigationMapViewDelegate.navigationMapView(_:routeCasingStyleLayerWithIdentifier:source:)` in favor of four new delegate methods to customize the route styling ([#2377](https://github.com/mapbox/mapbox-navigation-ios/pull/2377)):
captainbarbosa marked this conversation as resolved.
Show resolved Hide resolved
* `NavigationMapViewDelegate.navigationMapView(_:mainRouteStyleLayerWithIdentifier:source:)` to style the main route.
* `NavigationMapViewDelegate.navigationMapView(_:mainRouteCasingStyleLayerWithIdentifier:source:)` to style the casing of the main route.
* `NavigationMapViewDelegate.navigationMapView(_:alternativeRouteStyleLayerWithIdentifier:source:)` to style alternative routes.
* `NavigationMapViewDelegate.navigationMapView(_:alternativeRouteCasingStyleLayerWithIdentifier:source:)` to style the casing of alternative routes.
* Added the ability for the route line to disappear as the puck travels along a route during turn-by-turn navigation. ([#2377](https://github.com/mapbox/mapbox-navigation-ios/pull/2377))
* Fixed an issue where the casing for the main route would not overlap alternative routes. ([#2377](https://github.com/mapbox/mapbox-navigation-ios/pull/2377))

## v0.40.0

Expand Down
2 changes: 2 additions & 0 deletions MapboxNavigation/DayStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ extension UIColor {
class var defaultRouteLayer: UIColor { get { return #colorLiteral(red: 0.337254902, green: 0.6588235294, blue: 0.9843137255, alpha: 1) } }
class var defaultAlternateLine: UIColor { get { return #colorLiteral(red: 0.6, green: 0.6, blue: 0.6, alpha: 1) } }
class var defaultAlternateLineCasing: UIColor { get { return #colorLiteral(red: 0.5019607843, green: 0.4980392157, blue: 0.5019607843, alpha: 1) } }
class var defaultVanishingRouteColor: UIColor { get { return #colorLiteral(red: 1, green: 1, blue: 1, alpha: 0) } }
captainbarbosa marked this conversation as resolved.
Show resolved Hide resolved
class var defaultManeuverArrowStroke: UIColor { get { return .defaultRouteLayer } }
class var defaultManeuverArrow: UIColor { get { return #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1) } }

Expand Down Expand Up @@ -116,6 +117,7 @@ open class DayStyle: Style {
NavigationMapView.appearance().maneuverArrowStrokeColor = .defaultManeuverArrowStroke
NavigationMapView.appearance().routeAlternateColor = .defaultAlternateLine
NavigationMapView.appearance().routeCasingColor = .defaultRouteCasing
NavigationMapView.appearance().vanishingRouteColor = .defaultVanishingRouteColor
NavigationMapView.appearance().trafficHeavyColor = .trafficHeavy
NavigationMapView.appearance().trafficLowColor = .trafficLow
NavigationMapView.appearance().trafficModerateColor = .trafficModerate
Expand Down
Loading