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, |
Instance methods
init() |
Properties
var searchTypes: MMKSearchType { get set } |
@NSCopying var resultPageSize: NSNumber? { get set } |
var snippets: MMKSearchSnippet { get set } |
var userPosition: MMKPoint? { get set } |
var origin: String? { get set } |
var geometry: Bool { get set } |
var disableSpellingCorrection: Bool { get set } |
var filters: MMKSearchFilterCollection? { get set } |
Class methods
init(searchTypes:resultPageSize:snippets:userPosition:origin:geometry:disableSpellingCorrection:filters:)
init(searchTypes: MMKSearchType, |
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.