Package com.navmii.sdk.routenavigation
Class ReroutingSettings
- java.lang.Object
-
- com.navmii.sdk.routenavigation.ReroutingSettings
-
public final class ReroutingSettings extends java.lang.Object
Interface represents rerouting settings. When rerouting occurs, the rerouting engine attempts to use a route similar to the one initially sent to RouteNavigator. The settings allow to control the conditions when the rerouting engine stops trying to do so. Note that there are some situations when the rerouting engine immediately stops considering the route initially sent to RouteNavigator. Those are: - rerouting occurred after user has joined another motorway; - rerouting engine couldn't find a route similar to the one initially sent to RouteNavigator; - settings don't provide any conditions to stop considering the route initially sent to RouteNavigator (both distanceFromOriginToForgetAboutSelectedRoute and reroutingCountToForgetAboutSelectedRoute are zeroes).
-
-
Constructor Summary
Constructors Constructor Description ReroutingSettings(int distanceFromOriginToForgetAboutSelectedRoute, int reroutingCountToForgetAboutSelectedRoute, int maximalRouteLengthToIgnoreSelectedRoute)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getDistanceFromOriginToForgetAboutSelectedRoute()
Returns distance in meters from route origin.int
getMaximalRouteLengthToIgnoreSelectedRoute()
Returns maximal route length in meters to ignore the selected route.int
getReroutingCountToForgetAboutSelectedRoute()
Returns the number of reroutings to forget about the selected route.java.lang.String
toString()
-
-
-
Method Detail
-
getDistanceFromOriginToForgetAboutSelectedRoute
public int getDistanceFromOriginToForgetAboutSelectedRoute()
Returns distance in meters from route origin. After passing this distance the route initially sent to RouteNavigator won't be considered in rerouting. If the specified distance is non-zero, rerouting engine won't consider the route initially sent to RouteNavigator after distance from the route origin to the current position is higher than the specified distance. Default value is 4000 meters.
-
getReroutingCountToForgetAboutSelectedRoute
public int getReroutingCountToForgetAboutSelectedRoute()
Returns the number of reroutings to forget about the selected route. If value is non-zero, the rerouting engine stops considering the route initially sent to RouteNavigator as soon as the specified number of reroutings occurred. Default value is 0.
-
getMaximalRouteLengthToIgnoreSelectedRoute
public int getMaximalRouteLengthToIgnoreSelectedRoute()
Returns maximal route length in meters to ignore the selected route. If value is non-zero, the rerouting engine won't try to get back to the route initially sent to RouteNavigator if it's length is lower than the specified value. Default value is 4000 meters.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-