From 39195a976de14d95f43dda17cbabb1be28b5f1c1 Mon Sep 17 00:00:00 2001 From: Shan Ma Date: Thu, 3 Dec 2020 10:16:03 -0800 Subject: [PATCH] update changelog and clean code --- CHANGELOG.md | 4 ++++ MapboxNavigation/NavigationMapView.swift | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51ea043025c..c184656d16d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ * `NavigationMapViewDelegate.navigationMapView(_:alternativeRouteStyleLayerWithIdentifier:source:)` to style alternative route. * `NavigationMapViewDelegate.navigationMapView(_:alternativeRouteCasingStyleLayerWithIdentifier:source:)` to style the casing of alternative route. +### Vanishing route line + +* Added the ability to synchronize route progress, puck and vanishing route line with a location based distance calculation implementation. ([#2737](https://github.com/mapbox/mapbox-navigation-ios/pull/2737)) + ### Other changes * Added Ukrainian localization. ([#2735](https://github.com/mapbox/mapbox-navigation-ios/pull/2735)) diff --git a/MapboxNavigation/NavigationMapView.swift b/MapboxNavigation/NavigationMapView.swift index 453adbf0949..a355000adee 100644 --- a/MapboxNavigation/NavigationMapView.swift +++ b/MapboxNavigation/NavigationMapView.swift @@ -533,10 +533,8 @@ open class NavigationMapView: MGLMapView, UIGestureRecognizerDelegate { below: alternativeRouteLayer) } } - if routeLineTracksTraversal{ - if let firstRoute = routes.first { - initPrimaryRoutePoints(route: firstRoute) - } + if routeLineTracksTraversal, let firstRoute = routes.first { + initPrimaryRoutePoints(route: firstRoute) } }