SKNavigationDelegate Protocol Reference

Conforms to NSObject
Declared in SKNavigationDelegate.h

Overview

The navigation delegate of the SKRoutingService must adopt the SKNavigationDelegate protocol. The SKNavigationDelegate protocol is used to receive navigation related update messages.

– routingService:didChangeDistanceToDestination:withFormattedDistance:

Called when the distance to the destination changed.

- (void)routingService:(SKRoutingService *)routingService didChangeDistanceToDestination:(NSInteger)distance withFormattedDistance:(NSString *)formattedDistance

Parameters

routingService

The routing service.

distance

The distance to the destination, in meters.

formattedDistance

The formatted and rounded distance.

Discussion

Called when the distance to the destination changed.

Declared In

SKNavigationDelegate.h

– routingService:didChangeEstimatedTimeToDestination:

Called when the estimated arrival time to the destination changed.

- (void)routingService:(SKRoutingService *)routingService didChangeEstimatedTimeToDestination:(NSInteger)time

Parameters

routingService

The routing service.

time

The estimated time to the destination, in seconds.

Discussion

Called when the estimated arrival time to the destination changed.

Declared In

SKNavigationDelegate.h

– routingService:didChangeAdviceID:

Called when the unique ID of the current advice is changed. Consistent with the adviceID from the SKRouteAdvice.

- (void)routingService:(SKRoutingService *)routingService didChangeAdviceID:(NSInteger)adviceID

Parameters

routingService

The routing service.

adviceID

The unique ID.

Discussion

Called when the unique ID of the current advice is changed. Consistent with the adviceID from the SKRouteAdvice.

Declared In

SKNavigationDelegate.h

– routingService:didChangeCurrentStreetName:streetType:countryCode:

Called when the current street name changed.

- (void)routingService:(SKRoutingService *)routingService didChangeCurrentStreetName:(NSString *)currentStreetName streetType:(SKStreetType)streetType countryCode:(NSString *)countryCode

Parameters

routingService

The routing service.

currentStreetName

The current street name.

streetType

The current street’s type.

countryCode

The current country code.

Discussion

Called when the current street name changed.

Declared In

SKNavigationDelegate.h

– routingService:didChangeNextStreetName:streetType:countryCode:

Called when the next street name changed.

- (void)routingService:(SKRoutingService *)routingService didChangeNextStreetName:(NSString *)nextStreetName streetType:(SKStreetType)streetType countryCode:(NSString *)countryCode

Parameters

routingService

The routing service.

nextStreetName

The next street name.

streetType

The next street’s type.

countryCode

The current country code.

Discussion

Called when the next street name changed.

Declared In

SKNavigationDelegate.h

– routingService:didChangeSecondNextStreet:streetType:countryCode:

Called when the street after the next street is changed.

- (void)routingService:(SKRoutingService *)routingService didChangeSecondNextStreet:(NSString *)nextStreetName streetType:(SKStreetType)streetType countryCode:(NSString *)countryCode

Parameters

routingService
  • The routing service
nextStreetName

The next street name.

streetType

The next street’s type.

countryCode

The current country code.

Discussion

Called when the street after the next street is changed.

Declared In

SKNavigationDelegate.h

– routingService:didChangeCurrentAdviceImage:withLastAdvice:

Called when the current visual advice image changed.

- (void)routingService:(SKRoutingService *)routingService didChangeCurrentAdviceImage:(UIImage *)adviceImage withLastAdvice:(BOOL)isLastAdvice

Parameters

routingService

The routing service.

adviceImage

Current visual advice image.

isLastAdvice

Specifies if this is the last visual advice before reaching the destination.

Discussion

Called when the current visual advice image changed.

Declared In

SKNavigationDelegate.h

– routingService:didChangeCurrentVisualAdviceDistance:withFormattedDistance:

Called when the distance to the current visual advice changed.

- (void)routingService:(SKRoutingService *)routingService didChangeCurrentVisualAdviceDistance:(NSInteger)distance withFormattedDistance:(NSString *)formattedDistance

Parameters

routingService

The routing service.

distance

The distance to the current visual advice, in meters.

formattedDistance

The formatted and rounded distance.

Discussion

Called when the distance to the current visual advice changed.

Declared In

SKNavigationDelegate.h

– routingService:didChangeSecondaryAdviceImage:withLastAdvice:

Called when the secondary visual advice image changed.

- (void)routingService:(SKRoutingService *)routingService didChangeSecondaryAdviceImage:(UIImage *)adviceImage withLastAdvice:(BOOL)isLastAdvice

Parameters

routingService

The routing service.

adviceImage

Secondary visual advice image.

isLastAdvice

Specifies if this is the last visual advice before reaching the destination.

Discussion

Called when the secondary visual advice image changed.

Declared In

SKNavigationDelegate.h

– routingService:didChangeSecondaryVisualAdviceDistance:withFormattedDistance:

Called when the distance to the secondary visual advice changed.

- (void)routingService:(SKRoutingService *)routingService didChangeSecondaryVisualAdviceDistance:(NSInteger)distance withFormattedDistance:(NSString *)formattedDistance

Parameters

routingService

The routing service.

distance

The distance to the secondary visual advice, in meters.

formattedDistance

The formatted and rounded distance.

Discussion

Called when the distance to the secondary visual advice changed.

Declared In

SKNavigationDelegate.h

– routingService:didChangeCurrentSpeed:

Called when the current speed changed.

- (void)routingService:(SKRoutingService *)routingService didChangeCurrentSpeed:(double)speed

Parameters

routingService

The routing service.

speed

The current speed, in m/s.

Discussion

Called when the current speed changed.

Declared In

SKNavigationDelegate.h

– routingService:didChangeCurrentSpeedLimit:

Called when the current speed limit changed.

- (void)routingService:(SKRoutingService *)routingService didChangeCurrentSpeedLimit:(double)speedLimit

Parameters

routingService

The routing service.

speedLimit

The current speed limit, in m/s.

Discussion

Called when the current speed limit changed.

Declared In

SKNavigationDelegate.h

– routingServiceDidStartRerouting:

Called when a rerouting starts. This happens when the device doesn’t follow the calculated route. When this is done, a new route is automatically calculated and will send success/failure callbacks via the SKRoutingDelegate. The calculatedAfterRerouting field of the SKRouteInformation will be set to YES.

- (void)routingServiceDidStartRerouting:(SKRoutingService *)routingService

Parameters

routingService

The routing service.

Discussion

Called when a rerouting starts. This happens when the device doesn’t follow the calculated route. When this is done, a new route is automatically calculated and will send success/failure callbacks via the SKRoutingDelegate. The calculatedAfterRerouting field of the SKRouteInformation will be set to YES.

Declared In

SKNavigationDelegate.h

– routingService:didEnterViaPointArea:

Called when entering the via point area. The via point is identified by the index parameter of this callback.

- (void)routingService:(SKRoutingService *)routingService didEnterViaPointArea:(NSInteger)index

Parameters

routingService

The routing service.

index

The index of the via point.

Discussion

Called when entering the via point area. The via point is identified by the index parameter of this callback.

Declared In

SKNavigationDelegate.h

– routingService:didReachViaPointWithIndex:

Called when a via point of the route used in navigation is reached. The via point is identified by the index parameter of this callback.

- (void)routingService:(SKRoutingService *)routingService didReachViaPointWithIndex:(NSInteger)index

Parameters

routingService

The routing service.

index

The index of the via point.

Discussion

Called when a via point of the route used in navigation is reached. The via point is identified by the index parameter of this callback.

Declared In

SKNavigationDelegate.h

– routingService:didExitViaPointArea:

Called when exiting the via point area. The via point is identified by the index parameter of this callback.

- (void)routingService:(SKRoutingService *)routingService didExitViaPointArea:(NSInteger)index

Parameters

routingService

The routing service.

index

The index of the via point.

Discussion

Called when exiting the via point area. The via point is identified by the index parameter of this callback.

Declared In

SKNavigationDelegate.h

– routingServiceDidReachDestination:

Called when the destination is reached. The route will stay visible on the map and the navigation will switch to free drive. Calling the stopNavigation method of the SKRoutingService will stop the navigation and remove the route from the map.

- (void)routingServiceDidReachDestination:(SKRoutingService *)routingService

Parameters

routingService

The routing service.

Discussion

Called when the destination is reached. The route will stay visible on the map and the navigation will switch to free drive. Calling the stopNavigation method of the SKRoutingService will stop the navigation and remove the route from the map.

Declared In

SKNavigationDelegate.h

– routingService:didChangeCurrentAdvice:isLastAdvice:

Is called when the first visual advice is changed and when the last advice becomes available before reaching the destination.

- (void)routingService:(SKRoutingService *)routingService didChangeCurrentAdvice:(SKRouteAdvice *)currentAdvice isLastAdvice:(BOOL)isLastAdvice

Parameters

routingService

The routing service.

currentAdvice

Contains information about the current advice.

isLastAdvice

Specifies if this is the last visual advice before reaching the destination.

Discussion

Is called when the first visual advice is changed and when the last advice becomes available before reaching the destination.

Declared In

SKNavigationDelegate.h

– routingService:didChangeNextAdvice:isLastAdvice:

Is called when the next visual advice is changed and when the last advice becomes available before reaching the destination.

- (void)routingService:(SKRoutingService *)routingService didChangeNextAdvice:(SKRouteAdvice *)nextAdvice isLastAdvice:(BOOL)isLastAdvice

Parameters

routingService

The routing service.

nextAdvice

Contains information about the next advice.

isLastAdvice

Specifies if this is the last visual advice before reaching the destination.

Discussion

Is called when the next visual advice is changed and when the last advice becomes available before reaching the destination.

Declared In

SKNavigationDelegate.h

– routingService:didChangeSecondAdvice:isLastAdvice:

Is called when the second visual advice is changed and when the last advice becomes available before reaching the destination.

- (void)routingService:(SKRoutingService *)routingService didChangeSecondAdvice:(SKRouteAdvice *)secondAdvice isLastAdvice:(BOOL)isLastAdvice

Parameters

routingService

The routing service.

secondAdvice

Contains information about the second advice.

isLastAdvice

Specifies if this is the last visual advice before reaching the destination.

Discussion

Is called when the second visual advice is changed and when the last advice becomes available before reaching the destination.

Declared In

SKNavigationDelegate.h

– routingService:didChangeCountryCode:

Called when the country code changed.

- (void)routingService:(SKRoutingService *)routingService didChangeCountryCode:(NSString *)countryCode

Parameters

routingService

The routing service.

countryCode

The current country code.

Discussion

Called when the country code changed.

Declared In

SKNavigationDelegate.h

– routingService:didChangeExitNumber:

Called when the exit number changed.

- (void)routingService:(SKRoutingService *)routingService didChangeExitNumber:(NSString *)exitNumber

Parameters

routingService

The routing service.

exitNumber

The number of the exit from a highway.

Discussion

Called when the exit number changed.

Declared In

SKNavigationDelegate.h

– routingService:didUpdateSpeedWarningToStatus:withAudioWarnings:insideCity:

Called when the speed warning status is updated. Thresholds for speed warnings can be set using the inCity, outsideCity members of the speedWarningThreshold property from the SKNavigationSettings object.

- (void)routingService:(SKRoutingService *)routingService didUpdateSpeedWarningToStatus:(BOOL)speedWarningIsActive withAudioWarnings:(NSArray *)audioWarnings insideCity:(BOOL)isInsideCity

Parameters

routingService

The routing service.

speedWarningIsActive

If YES, the speed warning is active. If NO, the speed warning is over.

audioWarnings

If the speedWarningIsActive is YES, audioFiles contains an audio playlist for an audio warning.

isInsideCity

Indicates that the device is inside/outside a city.

Discussion

Called when the speed warning status is updated. Thresholds for speed warnings can be set using the inCity, outsideCity members of the speedWarningThreshold property from the SKNavigationSettings object.

Declared In

SKNavigationDelegate.h

– routingService:didUpdateSpeedWarningToStatus:withInstruction:insideCity:

Called when the speed warning status is updated. Thresholds for speed warnings can be set using the inCity, outsideCity members of the speedWarningThreshold property from the SKNavigationSettings object.

- (BOOL)routingService:(SKRoutingService *)routingService didUpdateSpeedWarningToStatus:(BOOL)speedWarningIsActive withInstruction:(NSString *)instruction insideCity:(BOOL)isInsideCity

Parameters

routingService

The routing service.

speedWarningIsActive

If YES, the speed warning is active. If NO, the speed warning is over.

instruction

If the speedWarningIsActive is YES, instruction contains the readable instruction string.

isInsideCity

Indicates that the device is inside/outside a city.

Return Value

If it’s YES, the instruction will be played automatically.

Discussion

Called when the speed warning status is updated. Thresholds for speed warnings can be set using the inCity, outsideCity members of the speedWarningThreshold property from the SKNavigationSettings object.

Declared In

SKNavigationDelegate.h

– routingService:didUpdateViaPointsInformation:

Called when the information such as DTA and ETA to any via point has changed.

- (void)routingService:(SKRoutingService *)routingService didUpdateViaPointsInformation:(NSArray *)viaPoints

Parameters

routingService

The routing service.

viaPoints

The via points on the route, with the updated information.

Discussion

Called when the information such as DTA and ETA to any via point has changed.

Declared In

SKNavigationDelegate.h

– routingService:didUpdateUnfilteredAudioInstruction:withDistance:forLanguage:

Called when a new audio advice instruction is generated. This should be used if custom distance filters have to be applied to generated advices. Otherwise, use the routingService:didUpdateFilteredAudioInstruction:forLanguage callback.

- (BOOL)routingService:(SKRoutingService *)routingService didUpdateUnfilteredAudioInstruction:(NSString *)instruction withDistance:(NSInteger)distance forLanguage:(SKAdvisorLanguage)language

Parameters

routingService

The routing service.

instruction

The advice instruction in readable format.

distance

The distance to the location of the advice. This can be used for filtering.

language

The language of the instruction.

Return Value

If it’s YES the unifiltered audio instruction will be played automatically.

Discussion

Called when a new audio advice instruction is generated. This should be used if custom distance filters have to be applied to generated advices. Otherwise, use the routingService:didUpdateFilteredAudioInstruction:forLanguage callback.

Declared In

SKNavigationDelegate.h

– routingService:didUpdateFilteredAudioInstruction:forLanguage:

Called when a new filtered audio advice instruction will be played. This is called when a filtered advice instruction is generated. It’s not called as often as the routingService:didUpdateUnfilteredAudioInstruction:withDistance:forLanguage:. Distance and other logical filters are applied, so that only useful advices are played. If custom filters are required, implement the routingService:didUpdateUnfilteredAudioInstruction:withDistance:forLanguage: method and apply your own filter.

- (BOOL)routingService:(SKRoutingService *)routingService didUpdateFilteredAudioInstruction:(NSString *)instruction forLanguage:(SKAdvisorLanguage)language

Parameters

routingService

The routing service.

instruction

The advice instruction in readable format.

language

The language of the instruction.

Return Value

If it’s YES the filtered audio instruction will be played automatically.

Discussion

Called when a new filtered audio advice instruction will be played. This is called when a filtered advice instruction is generated. It’s not called as often as the routingService:didUpdateUnfilteredAudioInstruction:withDistance:forLanguage:. Distance and other logical filters are applied, so that only useful advices are played. If custom filters are required, implement the routingService:didUpdateUnfilteredAudioInstruction:withDistance:forLanguage: method and apply your own filter.

Declared In

SKNavigationDelegate.h