SKPOITracker Class Reference

Inherits from NSObject
Declared in SKPOITracker.h

Overview

SKPOITracker is used for tracking points of interest during a navigation. It has a dataSource, that provides POIs to the tracker, and a delegate, that will be notified which POIs are detected, based on a set of custom detection rules. SKPOITracker works during a navigation session only. Check the SKRoutingService for further details.

  dataSource

SKPOITracker’s dataSource, provides data to the SKPOITracker. Check SKPOITrackerDataSource’s documentation for more details.

@property (nonatomic, weak) id<SKPOITrackerDataSource> dataSource

Discussion

SKPOITracker’s dataSource, provides data to the SKPOITracker. Check SKPOITrackerDataSource’s documentation for more details.

Declared In

SKPOITracker.h

  delegate

SKPOITracker’s delegate, gets notified for detected POIs. Check SKPOITrackerDelegate’s documentation for more details.

@property (nonatomic, weak) id<SKPOITrackerDelegate> delegate

Discussion

SKPOITracker’s delegate, gets notified for detected POIs. Check SKPOITrackerDelegate’s documentation for more details.

Declared In

SKPOITracker.h

+ sharedInstance

Returns the singleton SKRoutingService instance.

+ (instancetype)sharedInstance

Discussion

Returns the singleton SKRoutingService instance.

Declared In

SKPOITracker.h

– startPOITrackerWithRadius:refreshMargin:forPOITypes:

Starts the POIs detection. The detection process can be customised using custom detection rules. The detection works during a navigation session only. Check the SKRoutingService for further details.

- (void)startPOITrackerWithRadius:(int)radius refreshMargin:(double)refreshMargin forPOITypes:(NSArray *)poiTypes

Parameters

radius

The radius of the POI coverage area. The dataSource will have to provide POIs in this radius when needed.

refreshMargin

The percentage of outer coverage area that triggers a refresh when reached, using the dataSource. Has to be in the [ 0.0, 0.5 ] interval.

poiTypes

An array of NSNumber objects, indicating the types of POIs which should be detected. The trackablePOIsAroundLocation:inRadius:withType datasource will be called for each type from the array.

Discussion

Starts the POIs detection. The detection process can be customised using custom detection rules. The detection works during a navigation session only. Check the SKRoutingService for further details.

Declared In

SKPOITracker.h

– stopPOITracker

Stops the POI detection.

- (void)stopPOITracker

Discussion

Stops the POI detection.

Declared In

SKPOITracker.h

– setRule:forPOIType:

Sets a rule for a certain POI type. For more details about rules please check the SKTrackablePOIRule’s documentation. All the rules defined by a SKTrackablePOIRule must be accomplished in order to detect a SKTrackablePOI.

- (void)setRule:(SKTrackablePOIRule *)rule forPOIType:(SKTrackablePOIType)type

Parameters

rule

The rule that will be used.

type

The type of SKTrackablePOIs that the rule will apply to.

Discussion

Sets a rule for a certain POI type. For more details about rules please check the SKTrackablePOIRule’s documentation. All the rules defined by a SKTrackablePOIRule must be accomplished in order to detect a SKTrackablePOI.

Declared In

SKPOITracker.h

– ruleForPOIType:

Returns the rule used for a certain SKTrackablePOIType in detection. For more details about rules please check the SKTrackablePOIRule’s documentation.

- (SKTrackablePOIRule *)ruleForPOIType:(SKTrackablePOIType)type

Parameters

type

The type of the rule.

Return Value

The rule that is used for this type of SKTrackablePOI in detection.

Discussion

Returns the rule used for a certain SKTrackablePOIType in detection. For more details about rules please check the SKTrackablePOIRule’s documentation.

Declared In

SKPOITracker.h

– setWarningRulesForType:withFilePath:

Configures the audio adviser.

- (void)setWarningRulesForType:(SKTrackablePOIType)type withFilePath:(NSString *)filePath

Parameters

type

The type of SKTrackablePOIs for what the configuration will apply to.

filePath

The path to the file which contains the data for the configuration of the adviser. Set to Nil for using the default configuration.

Discussion

Configures the audio adviser.

Declared In

SKPOITracker.h

– forceUpdateTrackedPOIs

Triggers the dataSource’s poiTracker:trackablePOIsAroundLocation:inRadius: instantly, even if the refreshMargin is not reached. Useful when the data source is updated.

- (void)forceUpdateTrackedPOIs

Discussion

Triggers the dataSource’s poiTracker:trackablePOIsAroundLocation:inRadius: instantly, even if the refreshMargin is not reached. Useful when the data source is updated.

Declared In

SKPOITracker.h

– trackablePOIsOnRoute:

Returns POIs located on the current route from the given array.

- (NSArray *)trackablePOIsOnRoute:(NSArray *)providedPOIs

Parameters

providedPOIs

Array of POIs to be filtered.

Return Value

The array of POIs located on the route.

Discussion

Returns POIs located on the current route from the given array.

Declared In

SKPOITracker.h