SnapToRoute

open class SnapToRoute : Snap

This attempts to snap the user to the closest position along the route. Prior to snapping the user, their location's checked to ensure that the user didn't veer off-route. If your application uses the MapLibre Map SDK, querying the map and snapping the user to the road grid might be a better solution.

Since

0.4.0

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun getSnappedLocation(location: Location, routeProgress: RouteProgress): Location

Calculate a snapped location along the route. Latitude, longitude and bearing are provided.