RouteUtils

open class RouteUtils

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Given a RouteProgress, this method will calculate the remaining waypoint names along the given route based on route option waypoint names and the progress remaining coordinates.

Link copied to clipboard
fun calculateRemainingWaypoints(routeProgress: RouteProgress): List<Point>?

Given a RouteProgress, this method will calculate the remaining coordinates along the given route based on total route coordinates and the progress remaining waypoints.

Link copied to clipboard

If navigation begins, a location update is sometimes needed to force a progress change update as soon as navigation is started.

Link copied to clipboard
fun findCurrentBannerInstructions(currentStep: LegStep, stepDistanceRemaining: Double): BannerInstructions?

Given the current step / current step distance remaining, this function will find the current instructions to be shown.

Link copied to clipboard
fun findCurrentBannerText(currentStep: LegStep, stepDistanceRemaining: Double, findPrimary: Boolean): BannerText?

This method returns the current BannerText based on the currentStep distance remaining.

Link copied to clipboard
fun findCurrentVoiceInstructions(currentStep: LegStep, stepDistanceRemaining: Double): VoiceInstructions?

This method returns the current VoiceInstructions based on the step distance remaining.

Link copied to clipboard
fun isArrivalEvent(routeProgress: RouteProgress, milestone: Milestone): Boolean

Looks at the current RouteProgress maneuverType for type "arrival", then checks if the arrival meter threshold has been hit.

Link copied to clipboard
fun isNewRoute(previousRouteProgress: RouteProgress?, directionsRoute: DirectionsRoute): Boolean
fun isNewRoute(previousRouteProgress: RouteProgress?, routeProgress: RouteProgress): Boolean

Compares a new routeProgress geometry to a previousRouteProgress geometry to determine if the user is traversing along a new route. If the route geometries do not match, this returns true.