Package com.navmii.sdk.routenavigation
Interface RouteNavigator
- All Known Implementing Classes:
RouteNavigator.CppProxy
public interface RouteNavigator
Interface allowing to access altering information about the route being navigated.
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
RouteNavigator.CppProxy
-
Method Summary
Modifier and Type Method Description void
addDestinationReachedListener(DestinationReachedListener listener)
Adds destination reached listener.void
addDistanceToNextDirectionChangedListener(DistanceToNextDirectionChangedListener listener)
Adds distance to next direction changed listener.void
addGuidanceListener(GuidanceListener listener)
Adds route navigation listener.void
addNavigationInfoChangedListener(NavigationInfoChangedListener listener)
Adds navigation info changed listener.void
addNextDirectionChangedListener(NextDirectionChangedListener listener)
Adds next direction changed listener.void
addOnRouteStateChangedListener(OnRouteStateChangedListener listener)
Adds OnRouteState listener.void
addPositionOnRouteChangedListener(PositionOnRouteChangedListener listener)
Adds position on route changed listener.void
addReroutingByTrafficListener(ReroutingByTrafficListener listener)
Adds rerouting by traffic events listener.void
addReroutingListener(ReroutingListener listener)
Adds rerouting events listener.void
addRouteVisualizerRequestListener(RouteVisualizerRequestListener listener)
Adds route visualizer request listener.void
addWaypointsPassedListener(WaypointsPassedListener listener)
Adds waypoints passed listener.int
getDistanceToNextDirectionInMeters()
Returns the distance to the next direction for the route loaded into the navigator.GuidanceSettings
getGuidanceSettings()
Returns guidance module settings.int
getMaxServerRoutesSnappingDistanceInMeters()
Defines the maximal distance of server routes snapping if automatic rerouting or rerouting by traffic occurs.Direction
getNextDirection()
Returns the next direction info for the route loaded into the navigator.OnRouteState
getOnRouteState()
Returns OnRouteState for the route being navigated if available.PositionOnRoute
getPositionOnRoute()
Returns the current position on the route loaded into the navigator.java.util.ArrayList<RoutePlanPoint>
getRemainingWaypoints()
Returns the remaining waypoint list if route is loaded into the navigator or 'null' otherwise.boolean
getReroutingByTrafficEnabled()
Specifies whether automatic rerouting by traffic is enabled.boolean
getReroutingEnabled()
Specifies whether automatic rerouting handling is enabled.ReroutingSettings
getReroutingSettings()
Specifies settings to be used during automatic rerouting handling.Route
getRoute()
Returns the route loaded into the navigator if available or 'null' otherwise.RouteVisualizationSettings
getRouteVisualizationSettings()
Specifies route visualization settings to be used to generate route visualizer requests.RouteVisualizerRequest
getRouteVisualizerRequest()
A route visualizer request which needs to be performed to display the current route navigator state on map.boolean
hasReachedDestination()
Indicates whether the route destination was reached.boolean
isNavigationActive()
Indicates whether a route is loaded into the navigator.boolean
isNavigationPaused()
Indicates whether the route navigation is paused.void
pauseNavigation()
Tells the navigator to pause the route navigation.void
removeDestinationReachedListener(DestinationReachedListener listener)
Removes destination reached listener.void
removeDistanceToNextDirectionChangedListener(DistanceToNextDirectionChangedListener listener)
Removes distance to next direction changed listener.void
removeGuidanceListener(GuidanceListener listener)
Removes route navigation listener.void
removeNavigationInfoChangedListener(NavigationInfoChangedListener listener)
Removes navigation info changed listener.void
removeNextDirectionChangedListener(NextDirectionChangedListener listener)
Removes next direction changed listener.void
removeOnRouteStateChangedListener(OnRouteStateChangedListener listener)
Removes OnRouteState listener.void
removePositionOnRouteChangedListener(PositionOnRouteChangedListener listener)
Removes position on route changed listener.void
removeReroutingByTrafficListener(ReroutingByTrafficListener listener)
Removes rerouting by traffic events listener.void
removeReroutingListener(ReroutingListener listener)
Removes rerouting events listener.void
removeRouteVisualizerRequestListener(RouteVisualizerRequestListener listener)
Removes route visualizer request listener.void
removeWaypointsPassedListener(WaypointsPassedListener listener)
Removes waypoints passed listener.void
resumeNavigation()
Tells the navigator to resume the route navigation.void
setMaxServerRoutesSnappingDistanceInMeters(int distanceInMeters)
Defines the maximal distance of server routes snapping if automatic rerouting or rerouting by traffic occurs.void
setReroutingByTrafficEnabled(boolean reroutingByTrafficEnabled)
Specifies whether automatic rerouting by traffic is enabled.void
setReroutingEnabled(boolean reroutingEnabled)
Specifies whether automatic rerouting handling is enabled.void
setReroutingSettings(ReroutingSettings settings)
Specifies settings to be used during automatic rerouting handling.void
setRouteVisualizationSettings(RouteVisualizationSettings settings)
Specifies route visualization settings to be used to generate route visualizer requests.void
startNavigatingTheRoute(Route route, boolean isCalculatedFromCurrentPosition)
Loads a route into the navigator.void
stopNavigation()
Stops navigating the route previously loaded into the navigator.
-
Method Details
-
isNavigationActive
boolean isNavigationActive()Indicates whether a route is loaded into the navigator. -
getRoute
Route getRoute()Returns the route loaded into the navigator if available or 'null' otherwise. -
isNavigationPaused
boolean isNavigationPaused()Indicates whether the route navigation is paused. -
getOnRouteState
OnRouteState getOnRouteState()Returns OnRouteState for the route being navigated if available. Returns OnRouteState.Undefined if no route is loaded into the navigator. -
hasReachedDestination
boolean hasReachedDestination()Indicates whether the route destination was reached. Returns 'false' if no route is loaded into the navigator. -
getRemainingWaypoints
java.util.ArrayList<RoutePlanPoint> getRemainingWaypoints()Returns the remaining waypoint list if route is loaded into the navigator or 'null' otherwise. -
getNextDirection
Direction getNextDirection()Returns the next direction info for the route loaded into the navigator. Returns 'null' if no next direction info is available (i.e. GPS position is missing etc.) or no route is loaded into the navigator. -
getDistanceToNextDirectionInMeters
int getDistanceToNextDirectionInMeters()Returns the distance to the next direction for the route loaded into the navigator. Returns -1 if the distance is unavailable (i.e. GPS position is missing etc.) or no route is loaded into the navigator. -
getPositionOnRoute
PositionOnRoute getPositionOnRoute()Returns the current position on the route loaded into the navigator. Returns 'null' if no current position is available (i.e. GPS position is missing etc.) or no route is loaded into the navigator. -
getRouteVisualizationSettings
RouteVisualizationSettings getRouteVisualizationSettings()Specifies route visualization settings to be used to generate route visualizer requests. -
setRouteVisualizationSettings
Specifies route visualization settings to be used to generate route visualizer requests. -
getRouteVisualizerRequest
RouteVisualizerRequest getRouteVisualizerRequest()A route visualizer request which needs to be performed to display the current route navigator state on map. -
getGuidanceSettings
GuidanceSettings getGuidanceSettings()Returns guidance module settings. -
getMaxServerRoutesSnappingDistanceInMeters
int getMaxServerRoutesSnappingDistanceInMeters()Defines the maximal distance of server routes snapping if automatic rerouting or rerouting by traffic occurs. For more information see RouteCalculationOptions.setMaxServerRoutesSnappingDistanceInMeters method in RouteCalculationOptions class. If zero value is specified, the default value of maxServerRoutesSnappingDistanceInMeters property of RouteCalculationOptions is used. Default value is 0. -
setMaxServerRoutesSnappingDistanceInMeters
void setMaxServerRoutesSnappingDistanceInMeters(int distanceInMeters)Defines the maximal distance of server routes snapping if automatic rerouting or rerouting by traffic occurs. For more information see RouteCalculationOptions.setMaxServerRoutesSnappingDistanceInMeters method in RouteCalculationOptions class. If zero value is specified, the default value of maxServerRoutesSnappingDistanceInMeters property of RouteCalculationOptions is used. Default value is 0. -
getReroutingSettings
ReroutingSettings getReroutingSettings()Specifies settings to be used during automatic rerouting handling. -
setReroutingSettings
Specifies settings to be used during automatic rerouting handling. -
getReroutingEnabled
boolean getReroutingEnabled()Specifies whether automatic rerouting handling is enabled. Default value is 'true'. -
setReroutingEnabled
void setReroutingEnabled(boolean reroutingEnabled)Specifies whether automatic rerouting handling is enabled. -
getReroutingByTrafficEnabled
boolean getReroutingByTrafficEnabled()Specifies whether automatic rerouting by traffic is enabled. Default value is 'true'. -
setReroutingByTrafficEnabled
void setReroutingByTrafficEnabled(boolean reroutingByTrafficEnabled)Specifies whether automatic rerouting by traffic is enabled. -
startNavigatingTheRoute
Loads a route into the navigator.- Parameters:
route
- A route for navigation.isCalculatedFromCurrentPosition
- Specifies whether the first point of the passed route should be treated as current position. Passing TRUE specifies that if, after passing the route to the navigator, the real current device position notably differs from the first point of the route, the first point of the route will be removed and the route will be recalculated from the real current device position. All other route plan points will remain unchanged. Passing FALSE on the other hand behaves differently depending on the method used to obtain the route. If the route was obtained usingcalculateRoute(ArrayList, RouteCalculationOptions, RouteCalculationListener)
orsnapRoute(ExternalRoute, SnappingOptions, RouteCalculationListener)
methods of RoutingManager, passing FALSE may cause calculation of additional route leg from the current device position to the first point of the passed route, if the first route point notably differs from the current device position. If the route was obtained usingsnapRouteFromPosition(ExternalRoutePoint, ExternalRoute, SnappingOptions, RouteCalculationListener)
method of RoutingManager, passing FALSE will have no effect and the route will be treated as calculated from current position.
-
stopNavigation
void stopNavigation()Stops navigating the route previously loaded into the navigator. -
pauseNavigation
void pauseNavigation()Tells the navigator to pause the route navigation. The route navigation stays paused until resumeNavigation method is called. While route navigation is paused, position on current route (if one is available) is NOT updated and you don't get any listeners called as well. -
resumeNavigation
void resumeNavigation()Tells the navigator to resume the route navigation. -
addOnRouteStateChangedListener
Adds OnRouteState listener.- Parameters:
listener
- Listener to add.
-
removeOnRouteStateChangedListener
Removes OnRouteState listener.- Parameters:
listener
- Listener to remove.
-
addDestinationReachedListener
Adds destination reached listener.- Parameters:
listener
- Listener to add.
-
removeDestinationReachedListener
Removes destination reached listener.- Parameters:
listener
- Listener to remove.
-
addWaypointsPassedListener
Adds waypoints passed listener.- Parameters:
listener
- Listener to add.
-
removeWaypointsPassedListener
Removes waypoints passed listener.- Parameters:
listener
- Listener to remove.
-
addNextDirectionChangedListener
Adds next direction changed listener.- Parameters:
listener
- Listener to add.
-
removeNextDirectionChangedListener
Removes next direction changed listener.- Parameters:
listener
- Listener to remove.
-
addDistanceToNextDirectionChangedListener
Adds distance to next direction changed listener.- Parameters:
listener
- Listener to add.
-
removeDistanceToNextDirectionChangedListener
Removes distance to next direction changed listener.- Parameters:
listener
- Listener to remove.
-
addPositionOnRouteChangedListener
Adds position on route changed listener.- Parameters:
listener
- Listener to add.
-
removePositionOnRouteChangedListener
Removes position on route changed listener.- Parameters:
listener
- Listener to remove.
-
addNavigationInfoChangedListener
Adds navigation info changed listener.- Parameters:
listener
- Listener to add.
-
removeNavigationInfoChangedListener
Removes navigation info changed listener.- Parameters:
listener
- Listener to remove.
-
addRouteVisualizerRequestListener
Adds route visualizer request listener.- Parameters:
listener
- Listener to add.
-
removeRouteVisualizerRequestListener
Removes route visualizer request listener.- Parameters:
listener
- Listener to remove.
-
addGuidanceListener
Adds route navigation listener.- Parameters:
listener
- Listener to add.
-
removeGuidanceListener
Removes route navigation listener.- Parameters:
listener
- Listener to remove.
-
addReroutingListener
Adds rerouting events listener.- Parameters:
listener
- Listener to add.
-
removeReroutingListener
Removes rerouting events listener.- Parameters:
listener
- Listener to remove.
-
addReroutingByTrafficListener
Adds rerouting by traffic events listener.- Parameters:
listener
- Listener to add.
-
removeReroutingByTrafficListener
Removes rerouting by traffic events listener.- Parameters:
listener
- Listener to remove.
-