SKSearchService Class Reference

Inherits from NSObject
Declared in SKSearchService.h

Overview

SKSearchService class provides services for searching POIs and addresses. SKSearchService supports one search at a time. If multiple search requests were started, only the latest request will be processed.

+ sharedInstance

Returns the singleton SKSearchService instance.

+ (instancetype)sharedInstance

Discussion

Returns the singleton SKSearchService instance.

Declared In

SKSearchService.h

  searchServiceDelegate

The delegate that must conform to SKSearchServiceDelegate protocol, used for receiving search results.

@property (atomic, weak) id<SKSearchServiceDelegate> searchServiceDelegate

Discussion

The delegate that must conform to SKSearchServiceDelegate protocol, used for receiving search results.

Declared In

SKSearchService.h

  searchResultsNumber

The maximum number of search results that will be returned by a search. The default value is 20.

@property (nonatomic, assign) int searchResultsNumber

Discussion

The maximum number of search results that will be returned by a search. The default value is 20.

Declared In

SKSearchService.h

  searchLanguage

The language in which the search results are returned. The default value is SKMapLanguageEN.

@property (nonatomic, assign) SKLanguage searchLanguage

Discussion

The language in which the search results are returned. The default value is SKMapLanguageEN.

Declared In

SKSearchService.h

  categoriesFromMainCategories

The POI categories hierarchy. The keys are the main categories (SKPOIMainCategory) and the values are arrays of subcategories (SKPOICategory).

@property (nonatomic, readonly, strong) NSDictionary *categoriesFromMainCategories

Discussion

The POI categories hierarchy. The keys are the main categories (SKPOIMainCategory) and the values are arrays of subcategories (SKPOICategory).

Declared In

SKSearchService.h

– startMultiStepSearchWithSettings:

Starts a multi-step search. It works only offline with data from offline packages. For geocoding an address, multiple steps are required: choosing the country, then the city, then the street, all from a previously retrieved list. The results will be retrieved on the searchService:didRetrieveMultiStepSearchResults: method of the SKSearchServiceDelegate protocol. For more information about search parameters, check SKMultiStepSearchSettings.

- (SKMapSearchStatus)startMultiStepSearchWithSettings:(SKMultiStepSearchSettings *)multiStepObject

Parameters

multiStepObject

Specifies the search settings.

Return Value

The status of starting the search operation.

Discussion

Starts a multi-step search. It works only offline with data from offline packages. For geocoding an address, multiple steps are required: choosing the country, then the city, then the street, all from a previously retrieved list. The results will be retrieved on the searchService:didRetrieveMultiStepSearchResults: method of the SKSearchServiceDelegate protocol. For more information about search parameters, check SKMultiStepSearchSettings.

Declared In

SKSearchService.h

– startNearbySearchWithSettings:

Starts a nearby search for streets and POIs around a coordinate. The results will be retrieved on the searchService:didRetrieveNearbySearchResults:withSearchMode: method of the SKSearchServiceDelegate protocol. For more information about search parameters, check SKNearbySearchSettings.

- (SKMapSearchStatus)startNearbySearchWithSettings:(SKNearbySearchSettings *)nearbySearchObject

Parameters

nearbySearchObject

Specifies the search settings.

Return Value

The status of starting the search operation.

Discussion

Starts a nearby search for streets and POIs around a coordinate. The results will be retrieved on the searchService:didRetrieveNearbySearchResults:withSearchMode: method of the SKSearchServiceDelegate protocol. For more information about search parameters, check SKNearbySearchSettings.

Declared In

SKSearchService.h

– cancelSearch

Cancels the ongoing search request.

- (void)cancelSearch

Discussion

Cancels the ongoing search request.

Declared In

SKSearchService.h

– getTextureId:

Get texture id for a given feature id, used for mapping icons to search results.

- (NSInteger)getTextureId:(NSInteger)featureId

Parameters

featureId

The feature id (category) of the search result.

Return Value

Texture id

Discussion

Get texture id for a given feature id, used for mapping icons to search results.

Declared In

SKSearchService.h

– startOneLineSearch:

Supports oneline search using the parameters provided by the oneLineSearchSettings.

- (SKMapSearchStatus)startOneLineSearch:(SKOneLineSearchSettings *)oneLineSearchSettings

Parameters

oneLineSearchSettings

Specifies the search settings.

Return Value

The status of starting the search operation.

Discussion

Supports oneline search using the parameters provided by the oneLineSearchSettings.

Declared In

SKSearchService.h