MapLibreNavigationOptions

data class MapLibreNavigationOptions(val maxTurnCompletionOffset: Double = Defaults.MAX_TURN_COMPLETION_OFFSET, val maneuverZoneRadius: Double = Defaults.MANEUVER_ZONE_RADIUS, val deadReckoningTimeInterval: Double = Defaults.DEAD_RECKONING_TIME_INTERVAL, val maxManipulatedCourseAngle: Double = Defaults.MAX_MANIPULATED_COURSE_ANGLE, val userLocationSnapDistance: Double = Defaults.USER_LOCATION_SNAPPING_DISTANCE, val secondsBeforeReroute: Int = Defaults.SECONDS_BEFORE_REROUTE, val defaultMilestonesEnabled: Boolean = Defaults.DEFAULT_MILESTONES_ENABLED, val snapToRoute: Boolean = Defaults.SNAP_TO_ROUTE, val enableOffRouteDetection: Boolean = Defaults.ENABLE_OFF_ROUTE_DETECTION, val enableFasterRouteDetection: Boolean = Defaults.ENABLE_FASTER_ROUTE_DETECTION, val manuallyEndNavigationUponCompletion: Boolean = Defaults.MANUALLY_END_NAVIGATION_UPON_COMPLETION, val metersRemainingTillArrival: Double = Defaults.METERS_REMAINING_TILL_ARRIVAL, val offRouteMinimumDistanceMetersAfterReroute: Double = Defaults.OFF_ROUTE_MINIMUM_DISTANCE_METERS_AFTER_REROUTE, val offRouteThresholdRadiusMeters: Double = Defaults.OFF_ROUTE_THRESHOLD_RADIUS_METERS, val offRouteMinimumDistanceMetersBeforeWrongDirection: Double = Defaults.OFF_ROUTE_MINIMUM_DISTANCE_METERS_BEFORE_WRONG_DIRECTION, val offRouteMinimumDistanceMetersBeforeRightDirection: Double = Defaults.OFF_ROUTE_MINIMUM_DISTANCE_METERS_BEFORE_RIGHT_DIRECTION, val isDebugLoggingEnabled: Boolean = Defaults.IS_DEBUG_LOGGING_ENABLED, val roundingIncrement: MapLibreNavigationOptions.RoundingIncrement = Defaults.roundingIncrement, val timeFormatType: MapLibreNavigationOptions.TimeFormat = TimeFormat.NONE_SPECIFIED, val locationAcceptableAccuracyInMetersThreshold: Int = Defaults.LOCATION_ACCEPTABLE_ACCURACY_IN_METERS_THRESHOLD, val fasterRouteCheckIntervalSeconds: Int = Defaults.FASTER_ROUTE_CHECK_INTERVAL_SECONDS)

Immutable and can't be changed after passing into MapLibreNavigation.

Constructors

Link copied to clipboard
constructor(maxTurnCompletionOffset: Double = Defaults.MAX_TURN_COMPLETION_OFFSET, maneuverZoneRadius: Double = Defaults.MANEUVER_ZONE_RADIUS, deadReckoningTimeInterval: Double = Defaults.DEAD_RECKONING_TIME_INTERVAL, maxManipulatedCourseAngle: Double = Defaults.MAX_MANIPULATED_COURSE_ANGLE, userLocationSnapDistance: Double = Defaults.USER_LOCATION_SNAPPING_DISTANCE, secondsBeforeReroute: Int = Defaults.SECONDS_BEFORE_REROUTE, defaultMilestonesEnabled: Boolean = Defaults.DEFAULT_MILESTONES_ENABLED, snapToRoute: Boolean = Defaults.SNAP_TO_ROUTE, enableOffRouteDetection: Boolean = Defaults.ENABLE_OFF_ROUTE_DETECTION, enableFasterRouteDetection: Boolean = Defaults.ENABLE_FASTER_ROUTE_DETECTION, manuallyEndNavigationUponCompletion: Boolean = Defaults.MANUALLY_END_NAVIGATION_UPON_COMPLETION, metersRemainingTillArrival: Double = Defaults.METERS_REMAINING_TILL_ARRIVAL, offRouteMinimumDistanceMetersAfterReroute: Double = Defaults.OFF_ROUTE_MINIMUM_DISTANCE_METERS_AFTER_REROUTE, offRouteThresholdRadiusMeters: Double = Defaults.OFF_ROUTE_THRESHOLD_RADIUS_METERS, offRouteMinimumDistanceMetersBeforeWrongDirection: Double = Defaults.OFF_ROUTE_MINIMUM_DISTANCE_METERS_BEFORE_WRONG_DIRECTION, offRouteMinimumDistanceMetersBeforeRightDirection: Double = Defaults.OFF_ROUTE_MINIMUM_DISTANCE_METERS_BEFORE_RIGHT_DIRECTION, isDebugLoggingEnabled: Boolean = Defaults.IS_DEBUG_LOGGING_ENABLED, roundingIncrement: MapLibreNavigationOptions.RoundingIncrement = Defaults.roundingIncrement, timeFormatType: MapLibreNavigationOptions.TimeFormat = TimeFormat.NONE_SPECIFIED, locationAcceptableAccuracyInMetersThreshold: Int = Defaults.LOCATION_ACCEPTABLE_ACCURACY_IN_METERS_THRESHOLD, fasterRouteCheckIntervalSeconds: Int = Defaults.FASTER_ROUTE_CHECK_INTERVAL_SECONDS)

Types

Link copied to clipboard
class Builder
Link copied to clipboard
object Defaults

Properties

Link copied to clipboard

When calculating whether or not the user is on the route, we look where the user will be given their speed and this variable.

Link copied to clipboard

If enabled, the default milestones VoiceInstructionMilestone and BannerInstructionMilestone are added and used by default.

Link copied to clipboard

In seconds, how quickly FasterRouteDetector will tell RouteProcessorBackgroundThread to check for a faster org.maplibre.navigation.core.models.DirectionsRoute.

Link copied to clipboard

If true, the SDK will print debug logs.

Default location acceptable accuracy threshold used in {@link LocationValidator}.

Link copied to clipboard

Radius in meters the user must enter to count as completing a step. One of two heuristics used to know when a user completes a step, see .maxTurnCompletionOffset.

Link copied to clipboard

Maximum angle the user puck will be rotated when snapping the user's course to the route line.

Link copied to clipboard

Threshold user must be within to count as completing a step. One of two heuristics used to know when a user completes a step, see .maneuverZoneRadius. The users heading and the finalHeading are compared. If this number is within this defined value, the user has completed the step.

Link copied to clipboard

Meter radius which the user must be inside for an arrival milestone to be triggered and navigation to end.

Minimum distance in meters that the user must travel after a re-routing was done.

Minimum distance in meters that the user must travel in the correct direction before the off-route logic recognizes the user is back on the right direction

Minimum distance in meters that the user must travel in the wrong direction before the off-route logic recognizes the user is moving away from upcoming maneuver

Link copied to clipboard

Threshold for off-route detection. If the user is outside of this defined radius, the user always is off route. Radius defined in meters.

Link copied to clipboard

The increment used for rounding the user's speed and the remaining duration of the route.

Link copied to clipboard

Seconds used before a reroute occurs.

Link copied to clipboard
Link copied to clipboard

Accepted deviation excluding horizontal accuracy before the user is considered to be off route.

Functions

Link copied to clipboard