routeDistanceRemaining

fun routeDistanceRemaining(legDistanceRemaining: Double, legIndex: Int, directionsRoute: DirectionsRoute): Double

Takes in the leg distance remaining value already calculated and if additional legs need to be traversed along after the current one, adds those distances and returns the new distance. Otherwise, if the route only contains one leg or the users on the last leg, this value will equal the leg distance remaining.