Interface Router
-
- All Implemented Interfaces:
public interface RouterRouter provides API to fetch route and cancel route-fetching request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceRouter.CallbackCallback for Router fetching
-
Method Summary
Modifier and Type Method Description abstract UnitgetRoute(RouteOptions routeOptions, Router.Callback callback)Fetch route based on RouteOptions abstract Unitcancel()Interrupts a route-fetching request if one is in progress. abstract UnitgetRouteRefresh(DirectionsRoute route, Integer legIndex, Integer geometryIndex, Boolean requestFasterRoute, RouteRefreshCallback callback)Refresh the traffic annotations for a given DirectionsRoute UnitonNetworkStatusChanged(Boolean isNetworkAvailable)Called when the network connection status changes. abstract Unitshutdown()Release used resources.
-
-
-
Method Detail
-
getRoute
abstract Unit getRoute(RouteOptions routeOptions, Router.Callback callback)
Fetch route based on RouteOptions
- Parameters:
routeOptions- RouteOptionscallback- Callback that gets notified with the results of the request
-
getRouteRefresh
abstract Unit getRouteRefresh(DirectionsRoute route, Integer legIndex, Integer geometryIndex, Boolean requestFasterRoute, RouteRefreshCallback callback)
Refresh the traffic annotations for a given DirectionsRoute
- Parameters:
route- DirectionsRoute the direction route to refreshlegIndex- Int the index of the current leg in the routegeometryIndex- the index of the current point in geometryrequestFasterRoute- true to request a faster route, false otherwisecallback- Callback that gets notified with the results of the request
-
onNetworkStatusChanged
Unit onNetworkStatusChanged(Boolean isNetworkAvailable)
Called when the network connection status changes. Can be used to determine which Route to use
-
-