public class RouteGenerationHandler extends java.lang.Object implements RouteGenerationTask.RouteGenerationEventListener
RouteGenerationTask. This
handler expects to be run on a UI thread.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ROUTE_GENERATED |
| Constructor and Description |
|---|
RouteGenerationHandler(MapView mapView,
PointMapItem origin,
PointMapItem dest,
Route route) |
| Modifier and Type | Method and Description |
|---|---|
android.app.ProgressDialog |
getDialog() |
void |
onAfterRouteGenerated(RoutePointPackage routePointPackage)
Fires after the route has been returned (after onRouteGenerated) and has not been cancelled.
|
void |
onBeforeRouteGenerated(RouteGenerationTask task,
boolean displayDialog)
Fires before the task is executed (NOTE: Will run on the UI thread)
|
void |
onCancelled()
Fires after the task has been cancelled.
|
void |
onException(java.lang.Exception ex)
Fires when an exception has been thrown.
|
void |
onProgressUpdated(double progress)
Fires when there is progress to report (NOTE: Will run on the UI thread).
|
void |
onRouteGenerated(RoutePointPackage routePointPackage)
Fires immediately after the route is generated (NOTE: Will run on the BACKGROUND thread).
|
public static final java.lang.String ROUTE_GENERATED
public RouteGenerationHandler(MapView mapView, PointMapItem origin, PointMapItem dest, Route route)
public void onBeforeRouteGenerated(RouteGenerationTask task, boolean displayDialog)
RouteGenerationTask.RouteGenerationEventListeneronBeforeRouteGenerated in interface RouteGenerationTask.RouteGenerationEventListenertask - The associated task.displayDialog - Specify whether or not to alert the user that
a new route is being generated.public void onProgressUpdated(double progress)
RouteGenerationTask.RouteGenerationEventListeneronProgressUpdated in interface RouteGenerationTask.RouteGenerationEventListenerprogress - A value from 0 to 1 representing the progress.public android.app.ProgressDialog getDialog()
public void onException(java.lang.Exception ex)
RouteGenerationTask.RouteGenerationEventListeneronException in interface RouteGenerationTask.RouteGenerationEventListenerex - The exception that was thrown.public void onRouteGenerated(RoutePointPackage routePointPackage)
RouteGenerationTask.RouteGenerationEventListeneronRouteGenerated in interface RouteGenerationTask.RouteGenerationEventListenerroutePointPackage - The routePointPackage that was generated.public void onAfterRouteGenerated(RoutePointPackage routePointPackage)
RouteGenerationTask.RouteGenerationEventListeneronAfterRouteGenerated in interface RouteGenerationTask.RouteGenerationEventListenerpublic void onCancelled()
RouteGenerationTask.RouteGenerationEventListeneronCancelled in interface RouteGenerationTask.RouteGenerationEventListener