HERE Android SDK Developer's Guide

TollCostRequest

The class TollCostRequest is a member of com.here.android.mpa.tce .

Class Summary

public final class TollCostRequest

extends java.lang.Object

Allows you to determine the toll costs for a specified route for a defined vehicle profile.

[For complete information, see the section Class Details]

Nested Class Summary

Table 1. Nested Classes in TollCostRequest
Nested Classes

public static abstract interface TollCostRequest.Listener

Represents a listener that reports information about the completion of a TollCostRequest TollCostRequest.

Constructor Summary

Table 2. Constructors in TollCostRequest
Constructors

TollCostRequest (Route route, TollCostOptions options)

Create a Toll Cost Extension request with the given route and parameters.

Method Summary

Table 3. Methods in TollCostRequest
Methods

public void cancel ()

Attempts to cancel the ongoing TollCostRequest.

public void execute (Listener<TollCostResult> listener)

Execute the TollCostRequest asynchronously with the specified listener.

Class Details

Allows you to determine the toll costs for a specified route for a defined vehicle profile.

Please note that it only support route calculated with transport mode CAR and TRUCK in ONLINE mode. Also note that, this request works only in Online Mode.

Constructor Details

TollCostRequest (Route route, TollCostOptions options)

Create a Toll Cost Extension request with the given route and parameters. The route parameter only provides the route and no routing option is considered for the toll cost calculation. It is the caller's responsibility to have the route and toll cost options compatible. When they are not compatible, e.g. for the toll cost the vehicle type is set as car, whereas the route is created for a truck, the quality of the outcome may deteriorate.

Please also note that route should only be calculated with transport mode CAR and TRUCK in ONLINE mode.

Parameters:

Throws:

  • IllegalArgumentException

    if route or options is not valid OR route is calculated offline OR route is not calculated with transportMode CAR or TRUCK.

Method Details

public void cancel ()

Attempts to cancel the ongoing TollCostRequest. Calling this method does not guarantees cancellation of the request. Subsequent calls of this method will be ignored, once the request is cancelled.

public void execute (Listener<TollCostResult> listener)

Execute the TollCostRequest asynchronously with the specified listener.

Parameters: