HERE Android SDK Developer's Guide

RouteWaypoint

The class RouteWaypoint is a member of com.here.android.mpa.routing .

Class Summary

public final class RouteWaypoint

extends java.lang.Object

Represents a waypoint to be used in a route calculation.

[For complete information, see the section Class Details]

Nested Class Summary

Table 1. Nested Classes in RouteWaypoint
Nested Classes

public static class RouteWaypoint.RoadInfo

Exposes additional information about RouteWaypoint, mainly the side of the road it's on.

public static final enumeration RouteWaypoint.Type

Represents different types of waypoints.

Constructor Summary

Table 2. Constructors in RouteWaypoint
Constructors

RouteWaypoint (GeoCoordinate coordinate)

Public Constructor.

Method Summary

Table 3. Methods in RouteWaypoint
Methods

public boolean equals (Object obj)

public GeoCoordinate getNavigablePosition ()

Gets the navigable position.

public GeoCoordinate getOriginalPosition ()

Gets the original position of this waypoint.

public RoadInfo getRoadInfo ()

Gets additional information about this waypoint.

public Type getWaypointType ()

Gets the Waypoint Type, see RouteWaypoint.Type for valid values.

public int hashCode ()

public RouteWaypoint setNavigablePosition (GeoCoordinate position)

Sets the waypoint's road position to be used for route calculation.

public RouteWaypoint setOriginalPosition (GeoCoordinate position)

Sets the original position, which identifies the off-the-road position of this waypoint, such as the exact location of a building.

public RouteWaypoint setWaypointType (Type type)

Sets the waypoint type.

Class Details

Represents a waypoint to be used in a route calculation. A RouteWaypoint contains the GeoCoordinate location, as well as additional information, such as the actual road position and whether it is a stop in the route.

Constructor Details

RouteWaypoint (GeoCoordinate coordinate)

Public Constructor. The specified location coordinate is used to set the original position of this waypoint.

Parameters:

  • coordinate

See also:

getOriginalPosition()

Method Details

public boolean equals (Object obj)

Parameters:

  • obj

public GeoCoordinate getNavigablePosition ()

Gets the navigable position. The navigable position is used for route calculation.

Returns:

The navigable position

public GeoCoordinate getOriginalPosition ()

Gets the original position of this waypoint.

Returns:

The original position

public RoadInfo getRoadInfo ()

Gets additional information about this waypoint.

This is only available for waypoints that were matched to the route as part of route calculation. Which means for waypoints obtained through a Route object, either by calling getRouteWaypoints() or by getting them from a RoutePlan obtained by calling getRoutePlan().

Returns:

additional information about this waypoint, or null if none is available

public Type getWaypointType ()

Gets the Waypoint Type, see RouteWaypoint.Type for valid values. By default, a RouteWaypoint is of STOP_WAYPOINT type.

Returns:

The current Type.

public int hashCode ()

public RouteWaypoint setNavigablePosition (GeoCoordinate position)

Sets the waypoint's road position to be used for route calculation.

For a waypoint that is not on a road, the navigable position acts as a road location hint for a route calculation. However, there's no guarantee that any location can work as a navigable position. It is best to only use a navigable position when you have a trusted source, such as from search results.

Working together with the navigable position, the original position is used by the HERE SDK for determining the side of street during arrival, and to let the calculated route approach the correct side of street, especially when there there is a physical or logical lane divider on the road.

By default, the navigable position is set to be the same as the geocoordinates provided to the RouteWaypoint constructor.

Parameters:

  • position

    to be set as the navigable position

Returns:

The modified RouteWaypoint itself.

See also:

Location

public RouteWaypoint setOriginalPosition (GeoCoordinate position)

Sets the original position, which identifies the off-the-road position of this waypoint, such as the exact location of a building.

The original position is required for a route calculation. By default, it is set to be the same as the geocoordinates provided to the RouteWaypoint constructor.

Working together with the navigable position, the original position is used by the HERE SDK for determining the side of street during arrival, and to let the calculated route approach the correct side of street, especially when there there is a physical or logical lane divider on the road.

Parameters:

  • position

    to be set as the original position

Returns:

The modified RouteWaypoint itself.

See also:

Location

public RouteWaypoint setWaypointType (Type type)

Sets the waypoint type. By default the waypoint is of STOP_WAYPOINT type.

Parameters:

Returns:

The modified RouteWaypoint itself.