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

-(nonnull instancetype) init

Do not directly instantiate an instance of this class

-(nullable instancetype) initWithRoute:(nonnull NMARoute *) route

Creates a toll cost request with the specified route

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

Creates a toll cost request with the specified route and options

-(void) startWithBlock:(nonnull NMATollCostRequestCompletionBlock ) block

Invokes the data request with the block

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

Invokes the data request with the specified listener

Class Method Summary

Table 2. Class Methods
Class Methods

+(nonnull instancetype) new

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.

-(nonnull instancetype) init

Do not directly instantiate an instance of this class.

-(nullable instancetype) initWithRoute:(nonnull 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.

-(nullable instancetype) initWithRoute:(nonnull NMARoute *) route andOptions:(nonnull 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:(nonnull 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:(nonnull id< NMATollCostRequestListener >) requestListener

Invokes the data request with the specified listener.

Parameters:

  • requestListener

    A listener to listen for the data results.

See also:

startWithBlock:

Class Method Details

+(nonnull instancetype) new

Instances of this class should not be initialized directly