Важно

This feature is available in the Full MapKit SDK version

YMKSearchOptions

class YMKSearchOptions : NSObject

Struct to fine-tune search request.

Summary

Class methods

 init(searchTypes: YMKSearchType,
   resultPageSize: NSNumber?,
         snippets: YMKSearchSnippet,
     userPosition: YMKPoint?,
           origin: String?,
         geometry: Bool,
 disableSpellingCorrection: Bool,
          filters: YMKSearchFilterCollection?)

Instance methods

init()

Properties

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

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

var snippetsYMKSearchSnippet { get set }
Snippets that will be requested

var userPositionYMKPoint? { 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 filtersYMKSearchFilterCollection? { get set }
Filter set that will be requested

Class methods

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

 init(searchTypes: YMKSearchType,
   resultPageSize: NSNumber?,
         snippets: YMKSearchSnippet,
     userPosition: YMKPoint?,
           origin: String?,
         geometry: Bool,
 disableSpellingCorrection: Bool,
          filters: YMKSearchFilterCollection?)


Instance methods

init()

init()


Properties

searchTypes

var searchTypes: YMKSearchType { get set }

The search type can be one of the YMKSearchType 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: YMKSearchSnippet { get set }

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


userPosition

var userPosition: YMKPoint? { 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: YMKSearchFilterCollection? { 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.


Предыдущая
Следующая