Class TrimbleMapsOnboardRouter

  • All Implemented Interfaces:
    com.trimblemaps.navigation.base.route.Router

    
    public final class TrimbleMapsOnboardRouter
     implements Router
                        

    TrimbleMapsOnboardRouter provides offline route fetching

    It uses offline storage path to store and retrieve data, setup endpoint, tiles' version, token. Config is provided via OnboardRouterOptions.

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit getRoute(RouteOptions routeOptions, Router.Callback callback) Fetch route based on RouteOptions
      Unit cancel() Interrupts a route-fetching request if one is in progress.
      Unit shutdown() Release used resources.
      Unit getRouteRefresh(DirectionsRoute route, Integer legIndex, Integer geometryIndex, Boolean requestFasterRoute, RouteRefreshCallback callback) Refresh the traffic annotations for a given DirectionsRoute
      • Methods inherited from class com.trimblemaps.navigation.base.route.Router

        onNetworkStatusChanged
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TrimbleMapsOnboardRouter

        TrimbleMapsOnboardRouter(Context context, TrimbleMapsNativeNavigator navigatorNative, Logger logger)
      • TrimbleMapsOnboardRouter

        TrimbleMapsOnboardRouter(Context context)
    • Method Detail

      • getRoute

         Unit getRoute(RouteOptions routeOptions, Router.Callback callback)

        Fetch route based on RouteOptions

        Parameters:
        routeOptions - RouteOptions
        callback - Callback that gets notified with the results of the request
      • cancel

         Unit cancel()

        Interrupts a route-fetching request if one is in progress.

      • getRouteRefresh

         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 refresh
        legIndex - Int the index of the current leg in the route
        requestFasterRoute - true to request faster route, false otherwise
        callback - Callback that gets notified with the results of the request