mapbox-navigation-ios icon indicating copy to clipboard operation
mapbox-navigation-ios copied to clipboard

Fix the intersections property loss after route refresh.

Open ShanMa1991 opened this issue 2 years ago • 1 comments

Description

This Pr is to fix the issue that after route refresh, the step intersections related properties will be set to default values. This Pr is to update the step intersections related properties with the updated location.

Implementation

  • Move the RouteController.updateDistanceToIntersection(from:) and RouteController.updateIntersectionDistances() to RouteProgress, and call them after the route refresh event.
  • Also call the RouteProgress.updateIntersectionIndex() in route refresh event to update the RouteStepProgress.intersectionIndex. Because it's updated by navigator status.

Screenshots or Gifs

ShanMa1991 avatar Oct 10 '22 18:10 ShanMa1991

Breaking Changes in MapboxCoreNavigation

Breaking API Changes

RouteLegProgress

  • removed method: init(leg:stepIndex:spokenInstructionIndex:) in RouteLegProgress

RouteProgress

  • removed method: init(route:options:legIndex:spokenInstructionIndex:) in RouteProgress

Breaking Changes in MapboxCoreNavigation

Breaking API Changes

RouteProgress

  • removed method: init(route:options:legIndex:spokenInstructionIndex:) in RouteProgress

RouteLegProgress

  • removed method: init(leg:stepIndex:spokenInstructionIndex:) in RouteLegProgress

Breaking Changes in MapboxCoreNavigation

Breaking API Changes

RouteProgress

  • removed method: init(route:options:legIndex:spokenInstructionIndex:) in RouteProgress

RouteLegProgress

  • removed method: init(leg:stepIndex:spokenInstructionIndex:) in RouteLegProgress

Breaking Changes in MapboxCoreNavigation

Breaking API Changes

RouteStepProgress

  • removed method: init(step:spokenInstructionIndex:) in RouteStepProgress

RouteLegProgress

  • removed method: init(leg:stepIndex:spokenInstructionIndex:) in RouteLegProgress

RouteProgress

  • removed method: init(route:options:legIndex:spokenInstructionIndex:) in RouteProgress