HERE Android SDK Developer's Guide

RoutingController

The class RoutingController is a member of com.here.android.mpa.venues3d .

Class Summary

public class RoutingController

extends java.lang.Object

[For complete information, see the section Class Details]

Nested Class Summary

Table 1. Nested Classes in RoutingController
Nested Classes

public static abstract interface RoutingController.RoutingControllerListener

Represents a listener to provide notification when a route calculation is completed.

Method Summary

Table 2. Methods in RoutingController
Methods

public void addListener (RoutingControllerListener listener)

Adds RoutingController.RoutingControllerListener object to RoutingController object.

public void calculateCombinedRoute (BaseLocation from, BaseLocation to, VenueRouteOptions options)

Starts route calculation with given start and end locations.

public void calculateCombinedRoute (BaseLocation[] points, VenueRouteOptions options)

Starts route calculation with given waypoints.

public void hideRoute ()

Hides the currently visible route.

public void removeListener (RoutingControllerListener listener)

Removes given RoutingController.RoutingControllerListener object from the list of listeners, which receive the CombinedRoute related events.

public void showRoute (CombinedRoute route)

Shows combined route from start location to destination in the map.

Class Details

Method Details

public void addListener (RoutingControllerListener listener)

Adds RoutingController.RoutingControllerListener object to RoutingController object.

Parameters:

  • listener

    The RoutingControllerListener object to be added

public void calculateCombinedRoute (BaseLocation from, BaseLocation to, VenueRouteOptions options)

Starts route calculation with given start and end locations. Calculation is done in an asynchronous manner, and the calculated route will be available for listeners of the RoutingController.RoutingControllerListener interface upon completion. Parking locations are only taken into account if the transport mode is set to car in RouteOptions. If the transport mode is car and the starting point has an associated parking location, the route segment from the starting point to the associated parking location will be in pedestrian mode. If the transport mode is car and the end point has an associated parking location, the route segment from the parking location to the end point will be in pedestrian mode.

Parameters:

  • from

    The start point of the route as BaseLocation object.

  • to

    The end point of the route as BaseLocation object.

  • options

public void calculateCombinedRoute (BaseLocation[] points, VenueRouteOptions options)

Starts route calculation with given waypoints. Calculation is done in an asynchronous manner, and the calculated route will be available for listeners of the RoutingController.RoutingControllerListener interface upon completion. Parking locations are only taken into account for the start and end points of the route, and only if the transport mode is set to car in RouteOptions. Parking locations on intermediate waypoints are ignored. If the transport mode is car and the starting point has an associated parking location, the route segment from the starting point to the associated parking location will be in pedestrian mode. If the transport mode is car and the end point has an associated parking location, the route segment from the parking location to the end point will be in pedestrian mode.

Parameters:

  • points

    The points on of the route as BaseLocation object (start, waypoints, end). Maximum number of elements is 11 (9 waypoints).

  • options

public void hideRoute ()

Hides the currently visible route. Does nothing if there is no route visible.

public void removeListener (RoutingControllerListener listener)

Removes given RoutingController.RoutingControllerListener object from the list of listeners, which receive the CombinedRoute related events.

Parameters:

  • listener

    The RoutingControllerListener object to be removed.

public void showRoute (CombinedRoute route)

Shows combined route from start location to destination in the map. This route can be used as a guide about how to get from starting point to the destination. Only one route at a time can be shown. When calling this method while there is already a route visible in the map, it will be replaced with the given route.

Parameters:

  • route