HERE iOS SDK Developer's Guide

<NMARouteManagerDelegate>

Protocol Summary

protocol <NMARouteManagerDelegate>

Derived from: <NSObject>

Represents a delegate to handle NMARouteManager route calculation updates.

Include: NMAKit.framework/headers/NMARouteManager.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for <NMARouteManagerDelegate> – <NMARouteManagerDelegate>

[For complete information, see the section Protocol Details]

Instance Method Summary

Table 1. Instance Methods
Instance Method Summary

-(void) routeManager:( NMARouteManager *) routeManager didCalculateRoutes:(nullable NSArray< __kindof NMARoute * > *) routes withError:( NMARouteManagerError ) error violatedOptions:(nullable NSArray< NSNumber * > *) violatedOptions

Callback upon completion of route calculation

- @optional (void) routeManager:( NMARouteManager *) routeManager didUpdateProgress:(float) progress

Callback for reporting the progress of route calculation; values range from 0

Protocol Details

Represents a delegate to handle NMARouteManager route calculation updates.

Methods of this protocol are called on the main queue.

Instance Method Details

-(void) routeManager:( NMARouteManager *) routeManager didCalculateRoutes:(nullable NSArray< __kindof NMARoute * > *) routes withError:( NMARouteManagerError ) error violatedOptions:(nullable NSArray< NSNumber * > *) violatedOptions

Callback upon completion of route calculation.

Parameters:

  • routeManager

    The NMARouteManager instance which calculated the route.

  • routes

    An NSArray of NMARoute objects representing alternate route solutions, or nil if route calculation failed. The route at index 0 is the best result found. The number of routes in the array will be less than or equal to the resultCount property specified in the NMARoutingMode used for the route request.

  • error

    A routing calculation error. See NMARouteManagerError for possible error codes. If NMARouteManagerErrorRouteUseDisabledRoads is returned thenviolatedOptions is not empty (the returned NMARoute is valid and can be used for navigation although it uses roads which were disabled in the original NMARoutingMode::routingOptions options).

  • violatedOptions

    An NSArray of NSNumber objects, one per route calculated, representing which options (if any) were violated for the corresponding route. The NSNumber objects should be converted to NSUInteger before checking. The value will be an OR combination of NMARoutingOption and NMARouteViolatedOption values, or NMARouteViolatedOptionNone if no options were violated. If route calculation failed, the array will contain a single object containing all the routing options (if any).

- @optional (void) routeManager:( NMARouteManager *) routeManager didUpdateProgress:(float) progress

Callback for reporting the progress of route calculation; values range from 0.0 (starting) to 1.0 (complete).

Note:

In certain circumstances a recalculation is required and this percentage will go from 1.0 to 0.0

Parameters:

  • routeManager

    The NMARouteManager singleton instance.

  • progress

    The progress of the current routing operation.