public class RouteNavigator
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
RouteNavigator.RouteNavigatorListener
Interface allowing key navigation events to be listened for.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAV_TO_NEXT_INTENT |
static java.lang.String |
NAV_TO_PREV_INTENT |
static java.lang.String |
QUIT_NAV_INTENT |
static java.lang.String |
TAG |
Modifier and Type | Method and Description |
---|---|
static int |
getBubbleRadius(Route.RouteMethod routeMethod,
android.content.SharedPreferences prefs,
boolean forOffRoute) |
static RouteNavigator |
getInstance()
Obtain the current instantiation of the route navigator that can be used to register a
callback listener.
|
MapView |
getMapView() |
MapGroup |
getNavGroup() |
RouteNavigationManager |
getNavManager() |
static PointMapItem |
getNextWaypoint(PointMapItem pmi,
double range,
MapView mapView,
android.content.SharedPreferences prefs)
Get the next waypoint marker in the route, if applicable
|
Route |
getRoute() |
boolean |
isNavigating() |
void |
registerRouteNavigatorListener(RouteNavigator.RouteNavigatorListener listener)
Registers a route navigation listener
|
boolean |
startNavigating(Route route,
int startingIndex) |
void |
stopNavigating()
Cleans up just the internal aspects of navigating
|
void |
unregisterRouteNavigatorListener(RouteNavigator.RouteNavigatorListener listener)
Unregisters a route navigation listener
|
boolean |
updateNavigation(Route updatedRoute)
Updates the navigator to begin navigating a different route in place without tearing down all
of the UI navigation components.
|
public static final java.lang.String TAG
public static final java.lang.String NAV_TO_NEXT_INTENT
public static final java.lang.String NAV_TO_PREV_INTENT
public static final java.lang.String QUIT_NAV_INTENT
public boolean isNavigating()
public Route getRoute()
public MapGroup getNavGroup()
public MapView getMapView()
public RouteNavigationManager getNavManager()
public static RouteNavigator getInstance()
public boolean updateNavigation(Route updatedRoute)
updatedRoute
- New route to navigatepublic boolean startNavigating(Route route, int startingIndex)
public void stopNavigating()
public static int getBubbleRadius(Route.RouteMethod routeMethod, android.content.SharedPreferences prefs, boolean forOffRoute)
public static PointMapItem getNextWaypoint(PointMapItem pmi, double range, MapView mapView, android.content.SharedPreferences prefs)
pmi
- Waypoint itemrange
- Range from src marker to target waypointmapView
- Map view instanceprefs
- Shared preferencespublic void registerRouteNavigatorListener(RouteNavigator.RouteNavigatorListener listener)
listener
- the listener fired during route navigationpublic void unregisterRouteNavigatorListener(RouteNavigator.RouteNavigatorListener listener)
listener
- the listener fired during route navigation