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

Inherits <NSObject>, and <NSCopying>.

Instance Methods

(nullable instancetype) - init
 
(nullable instancetype) - initInWalkingMode
 
(nullable instancetype) - initWithTraffic:
 

Properties

BOOL isWalkingMode
 
NMRoutingOptimization optimization
 
NMVehicleType vehicleType
 
BOOL avoidTollRoads
 
BOOL considerTraffic
 
BOOL useServerTimesToCalculateEta
 
NSInteger maxAlternativeRoutesCount
 
BOOL computeEstimatedTimeIgnoringTrafficDelay
 
NMRoutingType routingType
 
NSInteger maxOnboardRoutingDistanceInMeters
 
NSInteger maxServerRoutesSnappingDistanceInMeters
 
NMTrafficSnapshottrafficSnapshot
 
id< NMExternalRouteProviderexternalRouteProvider
 

Method Documentation

◆ init()

- (nullable instancetype) init

Initializes object with default values.

◆ initInWalkingMode()

- (nullable instancetype) initInWalkingMode

Initializes object with default values except the isWalkingMode property, which is initialized with 'YES'.

◆ initWithTraffic:()

- (nullable instancetype) initWithTraffic: (nonnull NMTrafficSnapshot *)  trafficSnapshot

Initializes object with default values except the trafficSnapshot property, which is initialized with the specified traffic snapshot.

Parameters
trafficSnapshot@nonnull Traffic snapshot to initialize object with.

Property Documentation

◆ avoidTollRoads

- (BOOL) avoidTollRoads
readwritenonatomicassign

Specifies whether toll roads should be avoided. The property is ignored in walking mode.

Default value is 'NO'.

◆ computeEstimatedTimeIgnoringTrafficDelay

- (BOOL) computeEstimatedTimeIgnoringTrafficDelay
readwritenonatomicassign

Informs routing engine that it should compute the estimated route time not considering delays caused by traffic along with just estimated route time. The computed value is available via the estimatedTimeIgnoringTrafficDelay property of NMRoute class.

Default value is 'NO'.

◆ considerTraffic

- (BOOL) considerTraffic
readwritenonatomicassign

Specifies whether traffic data should be considered during route calculation. The property is ignored in walking mode.

Default value is 'YES'.

◆ externalRouteProvider

- (id<NMExternalRouteProvider>) externalRouteProvider
readwritenonatomicstrong

Route provider to be used to fetch routes from external routing server. If not specified default server is used.

Default value is 'nil'.

◆ isWalkingMode

- (BOOL) isWalkingMode
readwritenonatomicassign

Specifies whether walking mode is used.

Default value is 'NO'.

◆ maxAlternativeRoutesCount

- (NSInteger) maxAlternativeRoutesCount
readwritenonatomicassign

Limits maximum number of alternative routes being calculated in route calculation session.

Default value is 3.

◆ maxOnboardRoutingDistanceInMeters

- (NSInteger) maxOnboardRoutingDistanceInMeters
readwritenonatomicassign

Specifies whether on-board or server routing will be used if the routingType property is set to NMRoutingType_Combined. If maximal distance in meters between each waypoint pair is larger than the specified value, server routing is used. Otherwise on-board routing is used. If the value of this property is set to -1, server routing is never used (same effect as using the NMRoutingType_Onboard value for the routingType property).

Default value is 30,000 meters.

◆ maxServerRoutesSnappingDistanceInMeters

- (NSInteger) maxServerRoutesSnappingDistanceInMeters
readwritenonatomicassign

Limits the distance of the route being snapped to map immediately after obtaining the route. Setting this property to -1 indicates that snapping distance is unlimited and the whole route will be snapped immediately after obtaining the route. Please note that setting large values or -1 to the property may slow down the whole calculation process, because the snapping process requires all the map tiles along the snapping route part being downloaded from web.

Default value is 100,000 meters.

Note
This property is taken into account in case of server routing only.

◆ optimization

- (NMRoutingOptimization) optimization
readwritenonatomicassign

Specifies route optimization. The property is ignored in walking mode.

Default value is NMRoutingOptimization_Fastest.

◆ routingType

- (NMRoutingType) routingType
readwritenonatomicassign

Specifies routing type. NMRoutingType_Online value forces the SDK to always use server routing. NMRoutingType_Onboard value forces the SDK to always use on-board routing.

Warning
Be careful using NMRoutingType_Onboard with online SDK as on-board routing engine in this case needs to download large amount of map data to build a long route. NMRoutingType_Combined value indicates that either on-board or server routing is used depending on the maxOnboardRoutingDistanceInMeters property value.

Default value is NMRoutingType_Combined.

◆ trafficSnapshot

- (NMTrafficSnapshot*) trafficSnapshot
readwritenonatomicstrong

A traffic snapshot which is used in route calculation and visualisation of the route polyline. The source of the traffic snapshot is another SDK module. If you want to consider traffic in route calculation and display it on the route polyline after the route is calculated you need to set valid nonnull value to this property.

Default value is 'nil'.

◆ useServerTimesToCalculateEta

- (BOOL) useServerTimesToCalculateEta
readwritenonatomicassign

Specifies whether the ETA of a route should be calculated using time data received from routing server (if available). If 'NO' is specified, the ETA is based on time data obtained from maps locally on the device.

Default value is 'YES'.

◆ vehicleType

- (NMVehicleType) vehicleType
readwritenonatomicassign

Specifies vehicle type. The property is ignored in walking mode.

Default value is NMVehicleType_Car.