HERE iOS SDK Developer's Guide

NMATollCostRequest

Class Summary

class NMATollCostRequest

Derived from: NSObject

Runs the toll cost data requests with the specified parameters.

Include: NMAKit.framework/headers/NMATollCostRequest.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMATollCostRequest

[For complete information, see the section Class Details]

Instance Method Summary

Table 1. Instance Methods
Instance Method Summary

-(void) cancel

Attempts to cancel the ongoing toll cost request

-(instancetype) init

Do not directly instantiate an instance of this class

-(instancetype) initWithRoute:( NMARoute *) route

Creates a toll cost request with the specified route

-(instancetype) initWithRoute:( NMARoute *) route andOptions:( NMATollCostOptions *) options

Creates a toll cost request with the specified route and options

-(void) startWithBlock:( NMATollCostRequestCompletionBlock ) block

Invokes the data request with the block

-(void) startWithListener:(id< NMATollCostRequestListener >) requestListener

Invokes the data request with the specified listener

Class Details

Runs the toll cost data requests with the specified parameters. Note that only the routes calculated with the following transport mode options are supported: NMATransportModeCar, NMATransportModeTruck So, if the route passed is not calculated with one of these transport modes, nil is returned from both of the init methods. Plus, the route should be calculated in the online mode and the offline mode is not supported.

Instance Method Details

-(void) cancel

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

-(instancetype) init

Do not directly instantiate an instance of this class.

-(instancetype) initWithRoute:( NMARoute *) route

Creates a toll cost request with the specified route. Note that the route vehicle type and route departure time are used for the toll cost request.

Parameters:

  • route

    The route for which the toll cost will be returned. When it is nil, the object isn't created, i.e. nil is returned.

Returns:

If the parameter is valid, an NMATollCostRequest object configured with the parameter and nil otherwise.

-(instancetype) initWithRoute:( NMARoute *) route andOptions:( NMATollCostOptions *) options

Creates a toll cost request with the specified route and options. 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.

Parameters:

  • route

    The route for which the toll cost will be returned. When it is nil, the object isn't created, i.e. nil is returned.

  • options

    All the toll cost calculation options. When it is nil, the object isn't created, i.e. nil is returned.

Returns:

If the parameters are valid, an NMATollCostRequest object configured with the parameters and nil otherwise.

-(void) startWithBlock:( NMATollCostRequestCompletionBlock ) block

Invokes the data request with the block.

Parameters:

  • block

    A block to run when the data received.

See also:

NMAPlatformDataRequestCompletionBlock

startWithListener:

-(void) startWithListener:(id< NMATollCostRequestListener >) requestListener

Invokes the data request with the specified listener.

Parameters:

  • requestListener

    A listener to listen for the data results.

See also:

startWithBlock:

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.