Warning
This feature is available in the Full MapKit SDK version
MMKSearchOptions
@interface MMKSearchOptions : NSObject |
Struct to fine-tune search request.
Summary
Class methods
+ (nonnull MMKSearchOptions *)searchOptionsWithSearchTypes:( MMKSearchType)searchTypes |
Instance methods
- (nonnull MMKSearchOptions *)init; |
Properties
@property (nonatomic, assign, unsafe_unretained, readwrite) |
@property (nonatomic, copy, readwrite, nullable) NSNumber *resultPageSize; |
@property (nonatomic, assign, unsafe_unretained, readwrite) |
@property (nonatomic, strong, readwrite, nullable) MMKPoint *userPosition; |
@property (nonatomic, copy, readwrite, nullable) NSString *origin; |
@property (nonatomic, assign, unsafe_unretained, readwrite) BOOL geometry; |
@property (nonatomic, assign, unsafe_unretained, readwrite) |
@property (nonatomic, strong, readwrite, nullable) |
Class methods
searchOptionsWithSearchTypes:resultPageSize:snippets:userPosition:origin:geometry:disableSpellingCorrection:filters:
+ (nonnull MMKSearchOptions *)searchOptionsWithSearchTypes:( MMKSearchType)searchTypes |
Instance methods
init
- (nonnull MMKSearchOptions *)init; |
Properties
searchTypes
@property (nonatomic, assign, unsafe_unretained, readwrite) |
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
@property (nonatomic, copy, readwrite, nullable) NSNumber *resultPageSize; |
Maximum number of search results per page.
Optional field, can be nil.
snippets
@property (nonatomic, assign, unsafe_unretained, readwrite) |
Snippets that will be requested. The value should be one of MMKSearchSnippet, or their bitwise 'OR' combination.
userPosition
@property (nonatomic, strong, readwrite, nullable) MMKPoint *userPosition; |
The server uses the user position to calculate the distance from the user to search results.
Optional field, can be nil.
origin
@property (nonatomic, copy, readwrite, nullable) NSString *origin; |
String that sets an identifier for the request source.
Optional field, can be nil.
geometry
@property (nonatomic, assign, unsafe_unretained, readwrite) BOOL geometry; |
Adds the geometry to the server response.
disableSpellingCorrection
@property (nonatomic, assign, unsafe_unretained, readwrite) |
Force disable correction of spelling mistakes.
filters
@property (nonatomic, strong, readwrite, nullable) |
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.