Closed faliinitse closed 10 months ago
Hi @faliinitse! Thank you for the suggestion. We are evaluating exposing this method publicly, but there are currently some technical problems. I will keep you updated on the progress.
See related PR: https://github.com/mapbox/mapbox-navigation-ios/pull/4261
I want to change the legIndex of RouteProgress After it initializes in RouteController. I found that legIndex in RouteProgress is public but even if i set it then
func updateIndexes(status: NavigationStatus, progress: RouteProgress)
method in RouteController revert it back to whatever coming in status.legIndex.I can also see that in the
init(route: Route, options: RouteOptions, legIndex: Int = 0, spokenInstructionIndex: Int = 0)
of RouteProgress there is an extra parameter legIndex but I can't pass it from anywhere. Can any one help me with this issue?I want to update the RouteProgress legIndex manually . Right now it is starting the progress from 0 legIndex. I want to set it by myself so it should calculate or give me the correct progress.
I found this Link but this solution only give option to go in a loop I want to set the x index directly and don't want to go in a loop because this method is a Async method.
In the above link it is refer to a method call
public func advanceLegIndex(completionHandler: AdvanceLegCompletionHandler? = nil)
but i can see that method is callingprivate func updateRouteLeg(to value: Int, completionHandler: AdvanceLegCompletionHandler? = nil)
so instead of advanceLegIndex if you make the updateRouteLeg public then this issue will be resolve.Thanks in advance