Package 

Interface RoutesController

  • All Implemented Interfaces:

    
    public interface RoutesController
    
                        

    Controls routes behavior on the map view.

    Access from the map view controller registry after the view is ready.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract String addRouteLine(RouteLine routeLine) Add a route on MapView with its rendering options.
      abstract List<String> addRouteLines(List<RouteLine> routeLines) Add list of routes on MapView with their rendering options.
      abstract Unit remove(String routeID) Remove Route from current MapView
      abstract Unit clear() Removes all routes from MapView
      abstract Unit updateRouteProgress(String routeID) Call this function to hide sections of the route that the vehicle has already passed.
      abstract Camera.Region region(List<String> routeIDs) Get the region that encompasses the given routes
      abstract String refresh(RouteLine routeLine) Refresh Route with its rendering options.
      abstract String refreshAlongRouteTraffic(AlongRouteTraffic alongRouteTraffic) Refresh alongRouteTraffic
      abstract Unit highlight(String routeID) Highlight Route, only one route is allowed to be highlighted at once.
      abstract Unit unHighlight() Unhighlight the existing highlighted route.
      abstract Location getLastEatenRoutePoint(String routeID) Get the last eaten route point
      abstract Boolean showTurnArrow(String routeName, Integer selectLegIndex, Integer selectStepIndex) show the specified(through selectLegIndex, selectStepIndex) turn arrow on route
      abstract Boolean hideTurnArrow(String routeName, Integer selectLegIndex, Integer selectStepIndex) hide a specified turn arrow from route
      abstract Boolean hideAllTurnArrows() hides all currently visible turn arrows
      abstract Boolean moveToTurnArrow(String routeName, Integer selectLegIndex, Integer selectStepIndex) moves the camera to a specified turn arrow, call showTurnArrow first
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • addRouteLine

         abstract String addRouteLine(RouteLine routeLine)

        Add a route on MapView with its rendering options. This is the recommended way to add a route with custom rendering options. Use RouteLine.builder to create route line with Builder pattern.

        Parameters:
        routeLine - route line containing a route and its rendering options
      • addRouteLines

         abstract List<String> addRouteLines(List<RouteLine> routeLines)

        Add list of routes on MapView with their rendering options. This is the recommended way to add multiple routes with custom rendering options. Use RouteLine.builder to create route lines with Builder pattern.

        Parameters:
        routeLines - list of route lines, each containing a route and its rendering options
      • remove

         abstract Unit remove(String routeID)

        Remove Route from current MapView

        Parameters:
        routeID - the route's ID used to remove it from the map
      • clear

         abstract Unit clear()

        Removes all routes from MapView

      • updateRouteProgress

         abstract Unit updateRouteProgress(String routeID)

        Call this function to hide sections of the route that the vehicle has already passed. The function only needs to be called once.

        Parameters:
        routeID - the route to be updated.
      • region

         abstract Camera.Region region(List<String> routeIDs)

        Get the region that encompasses the given routes

        Parameters:
        routeIDs - list of routes you want to show
      • refresh

         abstract String refresh(RouteLine routeLine)

        Refresh Route with its rendering options. This is the recommended way to refresh a route with custom rendering options. Use RouteLine.builder to create route line with Builder pattern.

        Parameters:
        routeLine - route line containing a route and its rendering options
      • refreshAlongRouteTraffic

         abstract String refreshAlongRouteTraffic(AlongRouteTraffic alongRouteTraffic)

        Refresh alongRouteTraffic

        Parameters:
        alongRouteTraffic - alongRouteTraffic info from drive session callback NavigationEventListener onAlongRouteTrafficUpdated
      • highlight

         abstract Unit highlight(String routeID)

        Highlight Route, only one route is allowed to be highlighted at once.

        Parameters:
        routeID - specify the route to be highlighted.
      • unHighlight

         abstract Unit unHighlight()

        Unhighlight the existing highlighted route.

      • getLastEatenRoutePoint

         abstract Location getLastEatenRoutePoint(String routeID)

        Get the last eaten route point

        Parameters:
        routeID - specify the route
      • showTurnArrow

         abstract Boolean showTurnArrow(String routeName, Integer selectLegIndex, Integer selectStepIndex)

        show the specified(through selectLegIndex, selectStepIndex) turn arrow on route

        Parameters:
        routeName - the name of the route to show turn arrow on
        selectLegIndex - the leg index in the route
        selectStepIndex - the step index in the route
      • hideTurnArrow

         abstract Boolean hideTurnArrow(String routeName, Integer selectLegIndex, Integer selectStepIndex)

        hide a specified turn arrow from route

        Parameters:
        routeName - the name of the route to hide turn arrow on
        selectLegIndex - the leg index in the route
        selectStepIndex - the step index in the route
      • hideAllTurnArrows

         abstract Boolean hideAllTurnArrows()

        hides all currently visible turn arrows

      • moveToTurnArrow

         abstract Boolean moveToTurnArrow(String routeName, Integer selectLegIndex, Integer selectStepIndex)

        moves the camera to a specified turn arrow, call showTurnArrow first

        Parameters:
        routeName - the name of the route to move to turn arrow
        selectLegIndex - the leg index in the route
        selectStepIndex - the step index in the route