Closed frankvollebregt closed 4 months ago
Hello @frankvollebregt
Regarding the first question, I think you can implement it as below.
Instruction(
routeOffset = it.routeOffset,
combineWithNext = if (it is GuidanceInstruction) (it as GuidanceInstruction).combineWithNext else false
)
Regarding your second question, Guidance Version 2 is buggy at the moment. 0.45.2 is going to be released soon, it will fix that issue.
Thank you! That does indeed resolve the first issue. I'll upgrade to the new version soon (I think 0.46.0 is out now), and open a new issue if anything comes up.
In the
Route.mapInstructions
method defined in the example app here, the instructions are mapped using thecombineWithNext
property of eachInstruction
in eachRouteLeg
. But this property has been deprecated (as per the change log and my IDE notifying me as such).It mentions the following notice:
But how can I do this? Can the example here (and perhaps the tutorial online) be updated s.t. the deprecated method is no longer used?
Edit
The same goes for the deprecated
GuidanceOptions
. When using the new version, I get an error toast when trying to plan the route. Clarifying this in the example app and/or documentation would go a long way to help. https://github.com/tomtom-international/tomtom-navigation-android-examples/blob/main/tomtom-navigation-core-examples/usecase/src/main/kotlin/com/example/usecase/MainActivity.kt#L245C13-L251C15