SITSearchFilter
Objective-C
@interface SITSearchFilter : NSObject <SITMapperProtocol>
Swift
class SITSearchFilter : NSObject, SITMapperProtocol
A data structure used to define filters for Point of Interest (POI) searches in the MapView.
You can filter by free-text and/or by POI category. This filter is typically used in conjunction with the search: method of MapView.
- Setting a property to
nilwill have no effect and will not modify that filter criterion. - Setting a property to an empty string (e.g.
@"") will clear that criterion from the search.
For example, setting text = nil will preserve the current text filter, while text = @"" will remove it.
-
Creates an empty search filter.
All filter criteria are unset by default (i.e.,
nil).Declaration
Objective-C
- (nonnull instancetype)init;Swift
init() -
Free-text string to match against POI names and descriptions.
@note
- Set to
nilto leave this criterion unchanged. - Set to
@""to remove any existing text filter and match all POIs.
Declaration
Objective-C
@property (nonatomic, strong) NSString *_Nullable text;Swift
var text: String? { get set } - Set to
-
Identifier of the POI category to filter results by.
@note
- Set to
nilto leave this criterion unchanged. - Set to
@""to remove any existing category filter.
Declaration
Objective-C
@property (nonatomic, strong) NSString *_Nullable poiCategoryIdentifier;Swift
var poiCategoryIdentifier: String? { get set } - Set to