HERE iOS SDK Developer's Guide

NMARouteManager

Class Summary

class NMARouteManager

Derived from: NSObject

Represents a manager responsible for calculating a NMARoute from a list of stops and (optionally) a NMARoutingMode.

Deprecated: This is deprecated since release 3.2. Use an NMARouter subclass. For core routing types (Car, Truck, Pedestrian, Bike) the appropriate class is NMACoreRouter. For Public Transit routing the appropriate class is NMAUrbanMobilityRouter.

Include: NMAKit.framework/headers/NMARouteManager.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMARouteManager

[For complete information, see the section Class Details]

Public Property Summary

Table 1. Public Properties
Public Properties

[readable, assign] BOOL  busy

Deprecated: This propoerty is deprecated since release 3.2, please use property of appropriate NMARouter subclass instead.

Indicates whether or not the NMARouteManager is currently calculating a route

[readable, writable, weak] id< NMARouteManagerDelegate delegate

Deprecated: This property is deprecated since release 3.2. Use appropriate NMARouter subclass instead.

The NMARouteManagerDelegate that listens for messages from the NMARouteManager

[readable, writable, assign] NMADynamicPenalty dynamicPenalty

Deprecated: This property is deprecated since release 3.2. Use NMACoreRouter dynamicPenalty property instead.

Indicate the dynamic penalty that should be applied to route calculations

Instance Method Summary

Table 2. Instance Methods
Instance Method Summary

-(BOOL) calculateRouteWithStops:(NSArray *) stops

Deprecated: This method is deprecated since release 3.2, please use appropriate NMARouter subclass instead.

Starts a route calculation with the given stop list and the default NMARoutingMode.

-(BOOL) calculateRouteWithStops:(NSArray *) stops routingMode:( NMARoutingMode *) mode

Deprecated: This method is deprecated since release 3.2, please use appropriate NMARouter subclass instead.

Starts a route calculation with the give stop list and routing mode

-(BOOL) cancel

Deprecated: This method is deprecated since release 3.2, please use method of appropriate NMARouter subclass instead.

Cancels the current route calculation.

Class Method Summary

Table 3. Class Methods
Class Methods

+( NMARouteManager *) sharedRouteManager

Returns the NMARouteManager singleton instance

Class Details

Represents a manager responsible for calculating a NMARoute from a list of stops and (optionally) a NMARoutingMode.

NMARouteManagerDelegate is used to monitor route calculation progress and route calculation completion. Set the NMARouteManager delegate property in order to receive callbacks through NMARouteManagerDelegate protocol.

The current status of the NMARouteManager can be checked via the busy property.

NMARouteManager only supports one routing request at a time. Attempts to make another request before the current request has finished will fail.

NMARouteManager requires valid authentication credentials to be set via NMAApplicationContext. If valid credentials are not present the API may not function correctly or may stop functioning correctly in the future when server side configurations change.

Routing within China is supported, but routes may not cross the Chinese border. Thus, any route calculation which begins, ends, or passes through China and involves one or more other countries will fail.

Note:

It is possible for an NMARouteManager request to return a route that can't be followed; for example, a route that is blocked by a traffic accident or construction work. These conditions will likely be reported if the traffic feature is available and enabled for routing, but they may not be in all cases. Appropriate caution should always be exercised when using routes provided by NMARouteManager.

Deprecated: This is deprecated since release 3.2. Use an NMARouter subclass. For core routing types (Car, Truck, Pedestrian, Bike) the appropriate class is NMACoreRouter. For Public Transit routing the appropriate class is NMAUrbanMobilityRouter.

Public Property Details

[readable, assign] BOOL busy

Deprecated: This propoerty is deprecated since release 3.2, please use property of appropriate NMARouter subclass instead.

Indicates whether or not the NMARouteManager is currently calculating a route.

Note:

Any requests made while the NMARouteManager is busy will fail.

[readable, writable, weak] id< NMARouteManagerDelegatedelegate

Deprecated: This property is deprecated since release 3.2. Use appropriate NMARouter subclass instead.

The NMARouteManagerDelegate that listens for messages from the NMARouteManager.

[readable, writable, assign] NMADynamicPenaltydynamicPenalty

Deprecated: This property is deprecated since release 3.2. Use NMACoreRouter dynamicPenalty property instead.

Indicate the dynamic penalty that should be applied to route calculations. Penalties can be applied in the form of restricting roads, areas and setting different traffic modes.

Note:

For the route calculation to consider traffic you must set an NMADynamicPenalty that specifies an NMATrafficPenaltyMode. Traffic-based routing requires an internet connection.

Instance Method Details

-(BOOL) calculateRouteWithStops:(NSArray *) stops

Deprecated: This method is deprecated since release 3.2, please use appropriate NMARouter subclass instead.

Starts a route calculation with the given stop list and the default NMARoutingMode.

This method returns NO and a route will not be calculated if access to this operation is denied. Contact your HERE representative for more information.

The array of stops used to calculate the route must have at least two items. Any of the following may be included in any combination:
  1. NMAGeoCoordinates (Deprecated since release 3.2, use NMAWaypoint instead).
  2. NMAPlace
  3. NMAPlaceLocation
  4. NMAWaypoint

If a request is made while a previous request is still in progress, this method will return NO and no callback will be sent to the delegate. If there is not another request in progress but the parameters of the current request are invalid, this method will return NO and a callback will be sent to the delegate.

Note:

See NMARoutingMode for the default routing mode properties.

Note:

NMARouteManagerDelegate routeManager:didCalculateRoutes:withError:violatedOptions: will be called upon success. The returned route will contain a list of NMAWayPoints based on the stop locations; the original stops will be not be returned.

Note:

Note: If the SDK/device becomes offline and you do not have offline permission for the transport mode being requested, this operation will be denied.

Parameters:

  • stops

    A list of stops to route between, maximum 128 stops. If the first stop or the last stop is of NMAWaypoint, their waypointType must be of NMAStopWaypoint type.

Returns:

YES if the route calculation request was made successfully, NO otherwise

-(BOOL) calculateRouteWithStops:(NSArray *) stops routingMode:( NMARoutingMode *) mode

Deprecated: This method is deprecated since release 3.2, please use appropriate NMARouter subclass instead.

Starts a route calculation with the give stop list and routing mode.

This method returns NO and a route will not be calculated if access to this operation is denied. Contact your HERE representative for more information.

Note:

NMARouteManagerDelegate routeManager:didCalculateRoutes:withError:violatedOptions: will be called upon completion.

Note:

Note: If the SDK/device becomes offline and you do not have offline permission for the transport mode being requested, this operation will be denied.

Note:

As of 3.2.2, This method returns NO if calculating a route with NMARoutingModeTrack since calculating a route in track mode is no longer supported.

Note:

This method returns NO and a route will not be calculated if calculating a route with NMATransportModePublicTransport that contains more than 2 stops.

Parameters:

  • stops

    A list of stops to route between, maximum 128 stops. If the first stop or the last stop is of NMAWaypoint, their waypointType must be of NMAStopWaypoint type.

  • mode

    The NMARoutingMode to use for route calculation

Returns:

YES if route calculation was successful, NO otherwise

See also:

calculateRouteWithStops:

-(BOOL) cancel

Deprecated: This method is deprecated since release 3.2, please use method of appropriate NMARouter subclass instead.

Cancels the current route calculation.

If route calculation has been started, calling this method cancels the calculation and then notifies the delegate by way of calling routeManager:didCalculateRoutes:withError:violatedOptions: with error code NMARouteManagerErrorRoutingCancelled. If routing calculation could not be cancelled (e.g. no existing calculation is being performed), the delegate will not be notified and NO will be returned from this method.

Returns:

YES if the cancellation can be processed, NO otherwise

Class Method Details

+( NMARouteManager *) sharedRouteManager

Returns the NMARouteManager singleton instance.

Note:

Use this method to obtain a NMARouteManager instance. Do not call init directly.

Returns:

shared NMARouteManager instance

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.