public class RouteNavigationViewModel extends java.lang.Object implements RouteNavigationManager.RouteNavigationManagerEventListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TAG |
Constructor and Description |
---|
RouteNavigationViewModel(MapView view,
RoutePanelViewModel routePanelViewModel) |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
void |
onArrivedAtPoint(RouteNavigationManager routeNavigationManager,
PointMapItem item)
Indicates that the user has arrived at a point (i.e.
|
void |
onDepartedPoint(RouteNavigationManager routeNavigationManager,
PointMapItem item)
Indicates that the user has departed a point (i.e.
|
void |
onGpsStatusChanged(RouteNavigationManager routeNavigationManager,
boolean found)
Indicates the location has changed.
|
void |
onLocationChanged(RouteNavigationManager routeNavigationManager,
GeoPoint oldLocation,
GeoPoint newLocation)
Indicates the location has changed.
|
void |
onNavigationObjectiveChanged(RouteNavigationManager routeNavigationManager,
PointMapItem newObjective,
boolean isFromRouteProgression)
Indicates that the navigation objective has changed.
|
void |
onOffRoute(RouteNavigationManager routeNavigationManager)
Indicates that the user has gone off route (Note: Only fired the first time the user has gone off route, not continuously).
|
void |
onReturnedToRoute(RouteNavigationManager routeNavigationManager)
Indicates that the user has returned to the route.
|
void |
onTriggerEntered(RouteNavigationManager routeNavigationManager,
PointMapItem item,
int triggerIndex)
Indicates that a navigation trigger has been entered.
|
public RouteNavigationViewModel(MapView view, RoutePanelViewModel routePanelViewModel)
public void onGpsStatusChanged(RouteNavigationManager routeNavigationManager, boolean found)
RouteNavigationManager.RouteNavigationManagerEventListener
onGpsStatusChanged
in interface RouteNavigationManager.RouteNavigationManagerEventListener
routeNavigationManager
- The RouteNavigationManager
.found
- if the gps is found or false if it has been lost.public void onLocationChanged(RouteNavigationManager routeNavigationManager, GeoPoint oldLocation, GeoPoint newLocation)
RouteNavigationManager.RouteNavigationManagerEventListener
onLocationChanged
in interface RouteNavigationManager.RouteNavigationManagerEventListener
routeNavigationManager
- The RouteNavigationManager
.oldLocation
- The previous location.newLocation
- The new location.public void onNavigationObjectiveChanged(RouteNavigationManager routeNavigationManager, PointMapItem newObjective, boolean isFromRouteProgression)
RouteNavigationManager.RouteNavigationManagerEventListener
onNavigationObjectiveChanged
in interface RouteNavigationManager.RouteNavigationManagerEventListener
routeNavigationManager
- The RouteNavigationManager
.newObjective
- The new navigation objective.isFromRouteProgression
- Indicates whether the event was raised due to natural route progression (e.g. the previous checkpoint was hit), or from manual intervention (e.g. the user skipped to this checkpoint).public void onOffRoute(RouteNavigationManager routeNavigationManager)
RouteNavigationManager.RouteNavigationManagerEventListener
onOffRoute
in interface RouteNavigationManager.RouteNavigationManagerEventListener
public void onReturnedToRoute(RouteNavigationManager routeNavigationManager)
RouteNavigationManager.RouteNavigationManagerEventListener
onReturnedToRoute
in interface RouteNavigationManager.RouteNavigationManagerEventListener
public void onTriggerEntered(RouteNavigationManager routeNavigationManager, PointMapItem item, int triggerIndex)
RouteNavigationManager.RouteNavigationManagerEventListener
onTriggerEntered
in interface RouteNavigationManager.RouteNavigationManagerEventListener
routeNavigationManager
- The RouteNavigationManager
.item
- The PointMapItem
that's trigger has been entered.triggerIndex
- The index of the PointMapItem
.public void onArrivedAtPoint(RouteNavigationManager routeNavigationManager, PointMapItem item)
RouteNavigationManager.RouteNavigationManagerEventListener
onArrivedAtPoint
in interface RouteNavigationManager.RouteNavigationManagerEventListener
routeNavigationManager
- The RouteNavigationManager
.item
- The item at which the user has arrived at.public void onDepartedPoint(RouteNavigationManager routeNavigationManager, PointMapItem item)
RouteNavigationManager.RouteNavigationManagerEventListener
onDepartedPoint
in interface RouteNavigationManager.RouteNavigationManagerEventListener
routeNavigationManager
- The RouteNavigationManager
.item
- The item from which the user has just departed.public void dispose()