Warning

This feature is available in the Full MapKit SDK version

MMKSearchOptions

class MMKSearchOptions : NSObject

Struct to fine-tune search request.

Summary

Class methods

 init(searchTypes: MMKSearchType,
   resultPageSize: NSNumber?,
         snippets: MMKSearchSnippet,
     userPosition: MMKPoint?,
           origin: String?,
         geometry: Bool,
 disableSpellingCorrection: Bool,
          filters: MMKSearchFilterCollection?)

Instance methods

init()

Properties

var searchTypesMMKSearchType { get set }
The search type can be one of the MMKSearchType values or their bitwise 'OR' combination

@NSCopying var resultPageSize: NSNumber? { get set }
Maximum number of search results per page

var snippetsMMKSearchSnippet { get set }
Snippets that will be requested

var userPositionMMKPoint? { get set }
The server uses the user position to calculate the distance from the user to search results

var origin: String? { get set }
String that sets an identifier for the request source

var geometry: Bool { get set }
Adds the geometry to the server response

var disableSpellingCorrection: Bool { get set }
Force disable correction of spelling mistakes

var filtersMMKSearchFilterCollection? { get set }
Filter set that will be requested

Class methods

init(searchTypes:resultPageSize:snippets:userPosition:origin:geometry:disableSpellingCorrection:filters:)

 init(searchTypes: MMKSearchType,
   resultPageSize: NSNumber?,
         snippets: MMKSearchSnippet,
     userPosition: MMKPoint?,
           origin: String?,
         geometry: Bool,
 disableSpellingCorrection: Bool,
          filters: MMKSearchFilterCollection?)


Instance methods

init()

init()


Properties

searchTypes

var searchTypes: MMKSearchType { get set }

The search type can be one of the MMKSearchType values or their bitwise 'OR' combination. If searchType is not initialized, it means to search in all the sources.


resultPageSize

@NSCopying var resultPageSize: NSNumber? { get set }

Maximum number of search results per page.

Optional field, can be nil.


snippets

var snippets: MMKSearchSnippet { get set }

Snippets that will be requested. The value should be one of MMKSearchSnippet, or their bitwise 'OR' combination.


userPosition

var userPosition: MMKPoint? { get set }

The server uses the user position to calculate the distance from the user to search results.

Optional field, can be nil.


origin

var origin: String? { get set }

String that sets an identifier for the request source.

Optional field, can be nil.


geometry

var geometry: Bool { get set }

Adds the geometry to the server response.


disableSpellingCorrection

var disableSpellingCorrection: Bool { get set }

Force disable correction of spelling mistakes.


filters

var filters: MMKSearchFilterCollection? { get set }

Filter set that will be requested. Please note that the full set of filters that can be applied can only be obtained after the primary request. If you pass an invalid filter to the primary request (for example, "pharmacy with swimming pool"), the behavior is undefined. That is the search can either ignore an invalid filter or return an empty response.

Optional field, can be nil.