Navmii SDK  2.2.0
Write yourself a navigation system in iOS
Instance Methods | Class Methods | List of all members
NMRoutingService Class Reference

Inherits <NSObject>.

Instance Methods

(nullable NMRouteCalculationSession *) - calculateRouteUsingRoutePlan:statusReportListener:
 
(nullable NMRouteCalculationSession *) - calculateRouteUsingRoutePlan:options:statusReportListener:
 
(nullable NMRouteCalculationSession *) - snapRoute:options:statusReportListener:
 
(nullable NMRouteCalculationSession *) - snapRoute:fromPosition:options:statusReportListener:
 
(nullable instancetype) - NS_UNAVAILABLE
 

Class Methods

(nullable instancetype) + NS_UNAVAILABLE
 

Detailed Description

Service to be used to calculate or snap routes.

Method Documentation

◆ calculateRouteUsingRoutePlan:options:statusReportListener:()

- (nullable NMRouteCalculationSession *) calculateRouteUsingRoutePlan: (nonnull NMRoutePlan *)  routePlan
options: (nullable NMRouteCalculationOptions *)  options
statusReportListener: (nullable id< NMRouteCalculationListener >)  listener 

Initiates route calculation process using the specified route plan and options.

Parameters
routePlan@nonnull List of waypoints to calculate a route via;
optionsOptions to be used during the route calculation process. Default options are used if 'nil' is passed;
listenerListener to get notifications on route calculation status updates.
Returns
A route calculation session which is used to control the route calculation process or nil on error.
Note
You must not release the returned session object until the route calculation has finished, otherwise the route calculation will be canceled.

◆ calculateRouteUsingRoutePlan:statusReportListener:()

- (nullable NMRouteCalculationSession *) calculateRouteUsingRoutePlan: (nonnull NMRoutePlan *)  routePlan
statusReportListener: (nullable id< NMRouteCalculationListener >)  listener 

Initiates route calculation process using the specified route plan. Default route calculation options are used.

Parameters
routePlan@nonnull List of waypoints to calculate a route via;
listenerListener to get notifications on route calculation status updates.
Returns
A route calculation session which is used to control the route calculation process.
Note
You must not release the returned session object until the route calculation has finished, otherwise route calculation will be canceled.

◆ NS_UNAVAILABLE() [1/2]

- (nullable instancetype) NS_UNAVAILABLE

Default initialization is forbidden.

◆ NS_UNAVAILABLE() [2/2]

+ (nullable instancetype) NS_UNAVAILABLE

◆ snapRoute:fromPosition:options:statusReportListener:()

- (nullable NMRouteCalculationSession *) snapRoute: (nonnull NMExternalRoute *)  route
fromPosition: (nonnull NMPosition *)  position
options: (nonnull NMRouteSnappingOptions *)  options
statusReportListener: (nullable id< NMRouteCalculationListener >)  listener 

Starts new route calculation session to snap the specified route object to the map. Additionally calculates a route from the specified start point to the first point of the specified route object. If both, snapping and calculation, succeeded, combines both routes into one.

Parameters
routeRoute object to snap to the map.
positionSpecifies the first point in the final route.
optionsRoute snapping options.
listenerListener to get notifications on route calculation status updates.
Returns
A route calculation session which is used to control the route calculation process or nil on error.
Note
Please keep in mind that the start point of the route specified by the #position parameter won't be added to the route plan as a waypoint required to visit. Once the route is sent to navigator, most likely the rerouting will take place and the calculated part of the route (from the specified position to the first point of the specified external route) will be recalculated from the current device position.
You must not release the returned session object until the route calculation has finished, otherwise the route calculation will be canceled.

◆ snapRoute:options:statusReportListener:()

- (nullable NMRouteCalculationSession *) snapRoute: (nonnull NMExternalRoute *)  route
options: (nonnull NMRouteSnappingOptions *)  options
statusReportListener: (nullable id< NMRouteCalculationListener >)  listener 

Starts new route calculation session to snap the specified route object to the map.

Parameters
routeRoute object to snap to the map.
optionsRoute snapping options.
listenerListener to get notifications on route calculation status updates.
Returns
A route calculation session which is used to control the route calculation process or nil on error.
Note
You must not release the returned session object until the route calculation has finished, otherwise the route calculation will be canceled.