Class TrimbleMapsNavigation

  • All Implemented Interfaces:

    @UiThread()
    public final class TrimbleMapsNavigation
    
                        

    An entry point for interacting with the TrimbleMaps Navigation SDK.

    Only one instance of this class should be used per application process. Use TrimbleMapsNavigationProvider to easily manage the instance across lifecycle.

    Feel free to visit our docs pages and examples before diving in!

    The TrimbleMapsNavigation implementation can enter into a couple of internal states:

    • Idle

    • Free Drive

    • Active Guidance

    The SDK starts off in an Idle state.

    Whenever the startTripSession is called, the SDK will enter the Free Drive state starting to request and propagate location updates via the LocationObserver.

    This observer provides 2 location update values in mixed intervals - either the raw one received from the provided LocationEngine or the enhanced one map-matched internally using SDK's native capabilities.

    In Free Drive mode, the enhanced location is computed using nearby to user location's routing tiles that are continuously updating in the background. This can be configured using the OnboardRouterOptions in the NavigationOptions.

    If the session is stopped, the SDK will stop listening for raw location updates and enter the Idle state.

    A route can be requested with requestRoutes. If the request is successful and returns a non-empty list of routes in the RoutesObserver, the first route at index 0 is going to be chosen as a primary one.

    If the SDK is in an Idle state, it stays in this same state even when a primary route is available.

    If the SDK is already in the Free Drive mode or entering it whenever a primary route is available, the SDK will enter the Active Guidance mode instead and propagate meaningful RouteProgress.

    If a new routes request is made, or the routes are manually cleared, the SDK automatically fall back to either Idle or Free Drive state.

    You can use setRoutes to provide new routes, clear current ones, or change the route at primary index 0.