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

Inherits <NSObject>.

Instance Methods

(nullable instancetype) - init
 
(nullable instancetype) - initWithDistanceFromRouteOrigin:reroutingCount:maximalRouteLength:
 
(nullable instancetype) - settingsWithDistanceFromRouteOrigin:
 
(nullable instancetype) - settingsWithReroutingCount:
 
(nullable instancetype) - settingsWithMaximalRouteLength:
 

Properties

NSUInteger distanceFromOriginToForgetAboutSelectedRoute
 
NSUInteger reroutingCountToForgetAboutSelectedRoute
 
NSUInteger maximalRouteLengthToIgnoreSelectedRoute
 

Detailed Description

Interface represents rerouting settings. When rerouting occurs, the rerouting engine attempts to use a route similar to the one initially sent to NMRouteNavigator. The settings allow to control the conditions when the rerouting engine stops trying to do so.

Note that there are some situations when the rerouting engine immediately stops considering the route initially sent to NMRouteNavigator. Those are:

Method Documentation

◆ init()

- (nullable instancetype) init

Initializes settings with default values.

◆ initWithDistanceFromRouteOrigin:reroutingCount:maximalRouteLength:()

- (nullable instancetype) initWithDistanceFromRouteOrigin: (NSUInteger)  distanceFromRouteOriginInMeters
reroutingCount: (NSUInteger)  reroutingCount
maximalRouteLength: (NSUInteger)  maximalRouteLengthInMeters 

Initializes settings with specified values.

Parameters
distanceFromRouteOriginInMetersSpecifies value of the distanceFromOriginToForgetAboutSelectedRoute property.
reroutingCountSpecifies value of the reroutingCountToForgetAboutSelectedRoute property.
maximalRouteLengthInMetersSpecifies value of the maximalRouteLengthToIgnoreSelectedRoute property.
Returns
New rerouting settings instance.

◆ settingsWithDistanceFromRouteOrigin:()

- (nullable instancetype) settingsWithDistanceFromRouteOrigin: (NSUInteger)  distanceInMeters

Returns the copy of the current instance with new value of the distanceFromOriginToForgetAboutSelectedRoute property.

Parameters
distanceInMetersSpecifies value for the distanceFromOriginToForgetAboutSelectedRoute property.
Returns
New rerouting settings instance.

◆ settingsWithMaximalRouteLength:()

- (nullable instancetype) settingsWithMaximalRouteLength: (NSUInteger)  lengthInMeters

Returns the copy of the current instance with new value of the maximalRouteLengthToIgnoreSelectedRoute property.

Parameters
lengthInMetersSpecifies value for the maximalRouteLengthToIgnoreSelectedRoute property.
Returns
New rerouting settings instance.

◆ settingsWithReroutingCount:()

- (nullable instancetype) settingsWithReroutingCount: (NSUInteger)  count

Returns the copy of the current instance with new value of the reroutingCountToForgetAboutSelectedRoute property.

Parameters
countSpecifies value for the reroutingCountToForgetAboutSelectedRoute property.
Returns
New rerouting settings instance.

Property Documentation

◆ distanceFromOriginToForgetAboutSelectedRoute

- (NSUInteger) distanceFromOriginToForgetAboutSelectedRoute
readnonatomicassign

Returns distance in meters from route origin. After passing this distance the route initially sent to NMRouteNavigator won't be considered in rerouting. If the specified distance is non-zero, rerouting engine won't consider the route initially sent to NMRouteNavigator after distance from the route origin to the current position is higher than the specified distance.

Default value is 4000 meters.

◆ maximalRouteLengthToIgnoreSelectedRoute

- (NSUInteger) maximalRouteLengthToIgnoreSelectedRoute
readnonatomicassign

Returns maximal route length in meters to ignore the selected route. If value is non-zero, the rerouting engine won't try to get back to the route initially sent to NMRouteNavigator if it's length is lower than the specified value.

Default value is 4000 meters.

◆ reroutingCountToForgetAboutSelectedRoute

- (NSUInteger) reroutingCountToForgetAboutSelectedRoute
readnonatomicassign

Returns the number of reroutings to forget about the selected route. If value is non-zero, the rerouting engine stops considering the route initially sent to NMRouteNavigator as soon as the specified number of reroutings occurred.

Default value is 0.