MMKNavigation
@interface MMKNavigation : NSObject |
Undocumented
Summary
Instance methods
- (void)requestRoutesWithPoints:(nonnull NSArray<MMKRequestPoint *> *)points |
- (void)requestAlternatives; |
- (void)resolveUriWithUri:(nonnull NSString *)uri; |
- (void)cancelRequest; |
- (void)resetRoutes; |
- (void)addListenerWithNavigationListener: |
- (void)removeListenerWithNavigationListener: |
- (void)startGuidanceWithRoute:(nullable MMKDrivingRoute *)route; |
- (void)stopGuidance; |
- (void)suspend; |
- (void)resume; |
Properties
@property (nonatomic, assign, unsafe_unretained, readwrite, nonnull) |
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isAvoidTolls) |
@property (nonatomic, assign, unsafe_unretained, readwrite, |
@property (nonatomic, assign, unsafe_unretained, readwrite, |
@property (nonatomic, assign, unsafe_unretained, readwrite, nonnull) |
@property (nonatomic, assign, unsafe_unretained, readwrite) |
@property (nonatomic, readonly, nonnull) NSArray<MMKDrivingRoute *> *routes; |
@property (nonatomic, readonly, nonnull) MMKGuidance *guidance; |
Instance methods
requestRoutesWithPoints:initialAzimuth:routesCount:
- (void)requestRoutesWithPoints:(nonnull NSArray<MMKRequestPoint *> *)points |
Request routes for further guidance. If there was a pending routing request, it will be canceled.
requestAlternatives
- (void)requestAlternatives; |
Request global alternatives for the current route. If there was a pending routing request, it will be canceled.
resolveUriWithUri:
- (void)resolveUriWithUri:(nonnull NSString *)uri; |
Resolve saved driving route URI for further guidance. If there was a pending routing request, it will be canceled.
cancelRequest
- (void)cancelRequest; |
Cancel active routing request.
resetRoutes
- (void)resetRoutes; |
Cancel active routing request and clear routes vector.
addListenerWithNavigationListener:
- (void)addListenerWithNavigationListener: |
The class does not retain the object in the 'navigationListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
removeListenerWithNavigationListener:
- (void)removeListenerWithNavigationListener: |
Undocumented
startGuidanceWithRoute:
- (void)startGuidanceWithRoute:(nullable MMKDrivingRoute *)route; |
Start guidance with given route. This method will reset active current route if any. It only accepts either routes obtained from this routes
field or null
, which means freedrive session started.
stopGuidance
- (void)stopGuidance; |
Stops current guidance session. Call this method only if guidance has completely ended. For example, if you need to start another type of guidance (pedestrian for example) stop this first and than start another one. In case of route finished but you still on the road you must use startGuidance(null)
instead.
suspend
- (void)suspend; |
Stop tracking user position, later it could be resumed without losing current route. Useful when user don't want guidance in background.
resume
- (void)resume; |
Resumes suspended guidance. Guide will continue to guide the previous route or rebuild it. Useful when user don't want guidance in background.
Properties
vehicleOptions
@property (nonatomic, assign, unsafe_unretained, readwrite, nonnull) |
Changing this option may trigger reroute.
avoidTolls
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isAvoidTolls) |
The 'avoidTolls/avoidUnpaved/avoidPoorConditions' option instructs the router to return routes that avoid tolls/unpaved/roads in poor condition when possible. Changing these options may trigger reroute. All disabled by default.
avoidUnpaved
@property (nonatomic, assign, unsafe_unretained, readwrite, |
Undocumented
avoidPoorConditions
@property (nonatomic, assign, unsafe_unretained, readwrite, |
Undocumented
avoidedZones
@property (nonatomic, assign, unsafe_unretained, readwrite, nonnull) |
avoidedZones instructs the router to return routes that avoid provided polygons. If there are too many polygons or too complex polygon geometry, routes building may become impossible. In this case the error MMKDrivingTooComplexAvoidedZonesError will be returned. Changing this option may trigger reroute.
annotationLanguage
@property (nonatomic, assign, unsafe_unretained, readwrite) |
Set the annotation language. Changing this option may trigger reroute.
routes
@property (nonatomic, readonly, nonnull) NSArray<MMKDrivingRoute *> *routes; |
Resulting routes for the previous request. For requestAlternatives() it will contain the current route and fastest alternative route (if available) along with the received alternatives. Current route always will be the first one and fastest alternative will be the second.
guidance
@property (nonatomic, readonly, nonnull) MMKGuidance *guidance; |
Undocumented