public class MapboxNavigationOptions
extends java.lang.Object
| Constructor and Description |
|---|
MapboxNavigationOptions()
Creates a new MapboxNavigationOptions object.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getDeadReckoningTimeInterval()
Get the current time interval being used to calculate dead reckoning values.
|
java.lang.String |
getDirectionsProfile()
Get the directions profile which will be used when requesting the route.
|
int |
getHighAlertInterval()
Get the current number of seconds required for a
NavigationConstants.HIGH_ALERT_LEVEL alert to occurs. |
double |
getManeuverZoneRadius()
Get the current radius, in meters, the user must enter to count as completing a step.
|
double |
getMaximumDistanceOffRoute()
Get the current required maximum distance in meters a user can travel away from the step geometry before the
OffRouteListener's called. |
double |
getMaxManipulatedCourseAngle()
Get the maximum angle the user puck will be rotated when snapping the user's course to the route line.
|
double |
getMaxTurnCompletionOffset()
Get the current set threshold user must be within to count as completing a
LegStep. |
int |
getMediumAlertInterval()
Get the current number of seconds required for a
NavigationConstants.MEDIUM_ALERT_LEVEL alert to occur. |
double |
getMinimumHighAlertDistanceCycling()
Get the current required distance in meters representing the minimum length of a step for a
NavigationConstants.HIGH_ALERT_LEVEL to occur. |
double |
getMinimumHighAlertDistanceDriving()
Get the current required distance in meters representing the minimum length of a step for a
NavigationConstants.HIGH_ALERT_LEVEL to occur. |
double |
getMinimumHighAlertDistanceWalking()
Get the current required distance in meters representing the minimum length of a step for a
NavigationConstants.HIGH_ALERT_LEVEL to occur. |
double |
getMinimumMediumAlertDistanceCycling()
Get the current required distance in meters representing the minimum length of a step for a
NavigationConstants.MEDIUM_ALERT_LEVEL to occur while cycling. |
double |
getMinimumMediumAlertDistanceDriving()
Get the current required distance in meters representing the minimum length of a step for a
NavigationConstants.MEDIUM_ALERT_LEVEL to occur while driving. |
double |
getMinimumMediumAlertDistanceWalking()
Get the current required distance in meters representing the minimum length of a step for a
NavigationConstants.MEDIUM_ALERT_LEVEL to occur while walking. |
int |
getSecondsBeforeReroute()
The seconds before off-route happens, initially when the user goes off-route, a timer is started and waits till it
reaches this value and then notifies the off-route listener.
|
double |
getUserLocationSnapDistance()
Determines the distance the user must stay within for snapping to route to occur.
|
MapboxNavigationOptions |
setDeadReckoningTimeInterval(double deadReckoningTimeInterval)
When calculating whether or not the user is on the route, we look where the user will be given their speed and
this
deadReckoningTimeInterval variable. |
void |
setDirectionsProfile(java.lang.String profile)
Set the directions profile which will be used when requesting the route.
|
MapboxNavigationOptions |
setHighAlertInterval(int highAlertInterval)
Number of seconds left on step when a
NavigationConstants.HIGH_ALERT_LEVEL alert occurs. |
MapboxNavigationOptions |
setManeuverZoneRadius(double maneuverZoneRadius)
Radius, in meters, the user must enter to count as completing a step.
|
MapboxNavigationOptions |
setMaximumDistanceOffRoute(double maximumDistanceOffRoute)
Maximum distance in meters a user can travel away from the step geometry before the
OffRouteListener's called. |
MapboxNavigationOptions |
setMaxManipulatedCourseAngle(double maxManipulatedCourseAngle)
Maximum angle the user puck will be rotated when snapping the user's course to the route line.
|
MapboxNavigationOptions |
setMaxTurnCompletionOffset(double maxTurnCompletionOffset)
Set the threshold user must be within to count as completing a
LegStep. |
MapboxNavigationOptions |
setMediumAlertInterval(int mediumAlertInterval)
Number of seconds left on step when a
NavigationConstants.MEDIUM_ALERT_LEVEL alert occurs. |
MapboxNavigationOptions |
setMinimumHighAlertDistanceCycling(double minimumHighAlertDistanceCycling)
Distance in meters representing the minimum length of a step for a
NavigationConstants.HIGH_ALERT_LEVEL
to occur while cycling. |
MapboxNavigationOptions |
setMinimumHighAlertDistanceDriving(double minimumHighAlertDistanceDriving)
Distance in meters representing the minimum length of a step for a
NavigationConstants.HIGH_ALERT_LEVEL
to occur while driving. |
MapboxNavigationOptions |
setMinimumHighAlertDistanceWalking(double minimumHighAlertDistanceWalking)
Distance in meters representing the minimum length of a step for a
NavigationConstants.HIGH_ALERT_LEVEL
to occur while walking. |
MapboxNavigationOptions |
setMinimumMediumAlertDistanceCycling(double minimumMediumAlertDistanceCycling)
Distance in meters representing the minimum length of a step for a
NavigationConstants.MEDIUM_ALERT_LEVEL
to occur while cycling. |
MapboxNavigationOptions |
setMinimumMediumAlertDistanceDriving(double minimumMediumAlertDistanceDriving)
Distance in meters representing the minimum length of a step for a
NavigationConstants.MEDIUM_ALERT_LEVEL
to occur while driving. |
MapboxNavigationOptions |
setMinimumMediumAlertDistanceWalking(double minimumMediumAlertDistanceWalking)
Distance in meters representing the minimum length of a step for a
NavigationConstants.MEDIUM_ALERT_LEVEL
to occur while walking. |
void |
setSecondsBeforeReroute(int secondsBeforeReroute)
The seconds before off-route happens, initially when the user goes off-route, a timer is started and waits till it
reaches this value and then notifies the off-route listener.
|
void |
setUserLocationSnapDistance(double userLocationSnapDistance)
set the distance the user must stay within for snapping to route to occur.
|
public MapboxNavigationOptions()
public MapboxNavigationOptions setMaxTurnCompletionOffset(double maxTurnCompletionOffset)
LegStep. When checking if the users completed the step, the
users Location.getBearing() and the
StepManeuver.bearingAfter are compared. If this number is
within the setMaxTurnCompletionOffset the user has completed the step. This is one of the two heuristics
used to know when a user completes a step, the other being NavigationConstants.MANEUVER_ZONE_RADIUS.maxTurnCompletionOffset - degree double value between 0 and 359 representing the threshold used to consider if
the user has completed the step maneuver.public MapboxNavigationOptions setManeuverZoneRadius(double maneuverZoneRadius)
NavigationConstants.MAXIMUM_ALLOWED_DEGREE_OFFSET_FOR_TURN_COMPLETIONmaneuverZoneRadius - double radius value with unit meters representing the area the user must enter to count
as completing a step.public MapboxNavigationOptions setMediumAlertInterval(int mediumAlertInterval)
NavigationConstants.MEDIUM_ALERT_LEVEL alert occurs.mediumAlertInterval - integer value in unit seconds representing the seconds left till a medium alert
level occurs.public MapboxNavigationOptions setHighAlertInterval(int highAlertInterval)
NavigationConstants.HIGH_ALERT_LEVEL alert occurs.highAlertInterval - integer value in unit seconds representing the seconds left till a high alert
level occurs.public MapboxNavigationOptions setMinimumMediumAlertDistanceDriving(double minimumMediumAlertDistanceDriving)
NavigationConstants.MEDIUM_ALERT_LEVEL
to occur while driving.minimumMediumAlertDistanceDriving - double value in unit meters representing the minimum step length for a
medium alert to occur.public MapboxNavigationOptions setMinimumMediumAlertDistanceCycling(double minimumMediumAlertDistanceCycling)
NavigationConstants.MEDIUM_ALERT_LEVEL
to occur while cycling.minimumMediumAlertDistanceCycling - double value in unit meters representing the minimum step length for a
medium alert to occur.public MapboxNavigationOptions setMinimumMediumAlertDistanceWalking(double minimumMediumAlertDistanceWalking)
NavigationConstants.MEDIUM_ALERT_LEVEL
to occur while walking.minimumMediumAlertDistanceWalking - double value in unit meters representing the minimum step length for a
medium alert to occur.public MapboxNavigationOptions setMinimumHighAlertDistanceDriving(double minimumHighAlertDistanceDriving)
NavigationConstants.HIGH_ALERT_LEVEL
to occur while driving.minimumHighAlertDistanceDriving - double value in unit meters representing the minimum step length for a
high alert to occur.public MapboxNavigationOptions setMinimumHighAlertDistanceCycling(double minimumHighAlertDistanceCycling)
NavigationConstants.HIGH_ALERT_LEVEL
to occur while cycling.minimumHighAlertDistanceCycling - double value in unit meters representing the minimum step length for a
high alert to occur.public MapboxNavigationOptions setMinimumHighAlertDistanceWalking(double minimumHighAlertDistanceWalking)
NavigationConstants.HIGH_ALERT_LEVEL
to occur while walking.minimumHighAlertDistanceWalking - double value in unit meters representing the minimum step length for a
high alert to occur.public MapboxNavigationOptions setMaximumDistanceOffRoute(double maximumDistanceOffRoute)
OffRouteListener's called.maximumDistanceOffRoute - double value in unit meters representing the maximum distance a user can travel
before the OffRouteListener gets called.public MapboxNavigationOptions setDeadReckoningTimeInterval(double deadReckoningTimeInterval)
deadReckoningTimeInterval variable.deadReckoningTimeInterval - time interval in unit seconds we use for dead reckoning purposes.public MapboxNavigationOptions setMaxManipulatedCourseAngle(double maxManipulatedCourseAngle)
maxManipulatedCourseAngle - degree int value between 0 and 359 representing the maximum angle the user puck
will be rotatedpublic double getMaxTurnCompletionOffset()
LegStep. When checking if the user completed the step, the
users StepManeuver.bearingAfter are compared. If this number
is within the setMaxTurnCompletionOffset the user has completed the step. This is one of the two heuristics
used to know when a user completes a step, the other being NavigationConstants.MANEUVER_ZONE_RADIUS.public double getManeuverZoneRadius()
NavigationConstants.MAXIMUM_ALLOWED_DEGREE_OFFSET_FOR_TURN_COMPLETIONpublic int getMediumAlertInterval()
NavigationConstants.MEDIUM_ALERT_LEVEL alert to occur.medium alert level occurs.public int getHighAlertInterval()
NavigationConstants.HIGH_ALERT_LEVEL alert to occurs.high alert level occurs.public double getMinimumMediumAlertDistanceDriving()
NavigationConstants.MEDIUM_ALERT_LEVEL to occur while driving.medium alert to occur.public double getMinimumMediumAlertDistanceCycling()
NavigationConstants.MEDIUM_ALERT_LEVEL to occur while cycling.medium alert to occur.public double getMinimumMediumAlertDistanceWalking()
NavigationConstants.MEDIUM_ALERT_LEVEL to occur while walking.medium alert to occur.public double getMinimumHighAlertDistanceDriving()
NavigationConstants.HIGH_ALERT_LEVEL to occur.high alert to occur.public double getMinimumHighAlertDistanceCycling()
NavigationConstants.HIGH_ALERT_LEVEL to occur.high alert to occur.public double getMinimumHighAlertDistanceWalking()
NavigationConstants.HIGH_ALERT_LEVEL to occur.high alert to occur.public double getMaximumDistanceOffRoute()
OffRouteListener's called.OffRouteListener gets called.public double getDeadReckoningTimeInterval()
public double getMaxManipulatedCourseAngle()
public double getUserLocationSnapDistance()
public void setUserLocationSnapDistance(double userLocationSnapDistance)
userLocationSnapDistance - distance value in unit meterspublic int getSecondsBeforeReroute()
public void setSecondsBeforeReroute(int secondsBeforeReroute)
secondsBeforeReroute - seconds value before reroutingpublic void setDirectionsProfile(java.lang.String profile)
profile - one of the profiles defined in NavigationProfilespublic java.lang.String getDirectionsProfile()
NavigationProfiles