SearchContext
Objective-C
@interface SearchContext : NSObject
Swift
class SearchContext : NSObject
This class handles the search.
-
Start a search request for the given query and location.
Declaration
Objective-C
- (void)searchWithQuery:(nonnull NSString *)query location:(nonnull CoordinatesObject *)location completionHandler: (nonnull void (^)(NSArray<LandmarkObject *> *_Nonnull))handler;
Swift
func search(withQuery query: String, location: CoordinatesObject) async -> [LandmarkObject]
Parameters
query
The query string.
location
The location object.
handler
The block to execute asynchronously with the search results.
-
Start a nearby search request.
Declaration
Objective-C
- (void)searchAroundWithLocation:(nonnull CoordinatesObject *)location completionHandler: (nonnull void (^)(NSArray<LandmarkObject *> *_Nonnull)) handler;
Swift
func searchAround(withLocation location: CoordinatesObject) async -> [LandmarkObject]
Parameters
location
The location object.
handler
The block to execute asynchronously with the search results.
-
Start a nearby search request.
Declaration
Objective-C
- (void)searchAroundWithQuery:(nonnull NSString *)query location:(nonnull CoordinatesObject *)location completionHandler: (nonnull void (^)(NSArray<LandmarkObject *> *_Nonnull))handler;
Swift
func searchAround(withQuery query: String, location: CoordinatesObject) async -> [LandmarkObject]
Parameters
query
The query string.
location
The location object.
handler
The block to execute asynchronously with the search results.
-
Start a search request along the specified route.
Declaration
Objective-C
- (void)searchAlongWithRoute:(nonnull RouteObject *)route query:(nonnull NSString *)query completionHandler: (nonnull void (^)(NSArray<LandmarkObject *> *_Nonnull))handler;
Swift
func searchAlong(withRoute route: RouteObject, query: String) async -> [LandmarkObject]
Parameters
route
The route object.
query
The query string.
handler
The block to execute asynchronously with the search results.
-
Stop a search request.
Declaration
Objective-C
- (void)cancelSearch;
Swift
func cancelSearch()
-
Set the max number of matches.
Declaration
Objective-C
- (void)setMaxMatches:(int)value;
Swift
func setMaxMatches(_ value: Int32)
-
If set to true, only an exact match of free text search is returned as result.
Declaration
Objective-C
- (void)setExactMatch:(BOOL)value;
Swift
func setExactMatch(_ value: Bool)
-
If set to true, search is perform through the addresses.
Declaration
Objective-C
- (void)setSearchAddresses:(BOOL)value;
Swift
func setSearchAddresses(_ value: Bool)
-
If set to true, search is perform through map POIs.
Declaration
Objective-C
- (void)setSearchMapPOIs:(BOOL)value;
Swift
func setSearchMapPOIs(_ value: Bool)
-
Get access to the searching settings for the landmark stores.
Declaration
Objective-C
- (nullable LandmarkStoreContextCollection *)getLandmarkStoreCollection;
Swift
func getLandmarkStoreCollection() -> LandmarkStoreContextCollection?
-
Get access to the search target overlays collection.
Declaration
Objective-C
- (nullable OverlayMutableCollectionObject *)geOverlayMutableCollection;
Swift
func geOverlayMutableCollection() -> OverlayMutableCollectionObject?
-
If set to true, search will be done using only onboard data.
Declaration
Objective-C
- (void)setSearchOnlyOnboard:(BOOL)value;
Swift
func setSearchOnlyOnboard(_ value: Bool)
-
Get the flag for onboard search.
Declaration
Objective-C
- (BOOL)isSearchOnlyOnboardEnabled;
Swift
func isSearchOnlyOnboardEnabled() -> Bool
-
Set the threshold distance. @details This may be used to control the reverse geocoding and search along route lookup area.
Declaration
Objective-C
- (void)setThresholdDistance:(int)threshold;
Swift
func setThresholdDistance(_ threshold: Int32)
Parameters
threshold
The threshold value.
-
Get the threshold distance for the request.
Declaration
Objective-C
- (int)getThresholdDistance;
Swift
func getThresholdDistance() -> Int32
-
Set the landmark category. Returns true if operation was successful.
Declaration
Objective-C
- (BOOL)setCategory:(nonnull LandmarkCategoryObject *)category;
Swift
func setCategory(_ category: LandmarkCategoryObject) -> Bool
Parameters
category
The landmark category object.
-
Remove the landmark category. Returns true if operation was successful.
Declaration
Objective-C
- (BOOL)removeCategory:(nonnull LandmarkCategoryObject *)category;
Swift
func removeCategory(_ category: LandmarkCategoryObject) -> Bool
Parameters
category
The landmark category object.
-
Remove all landmark categories. Returns true if operation was successful.
Declaration
Objective-C
- (BOOL)removeAllCategories;
Swift
func removeAllCategories() -> Bool
-
Enables and disables the inclusion of fuzzy search results.
Declaration
Objective-C
- (void)setAllowFuzzyResults:(BOOL)value;
Swift
func setAllowFuzzyResults(_ value: Bool)
-
Test if fuzzy search results are allowed.
Declaration
Objective-C
- (BOOL)getAllowFuzzyResults;
Swift
func getAllowFuzzyResults() -> Bool
-
Enables and disables the inclusion of interpolated house number results.
Note
Default is true.Declaration
Objective-C
- (void)setEstimateMissingHouseNumbers:(BOOL)state;
Swift
func setEstimateMissingHouseNumbers(_ state: Bool)
-
Test if interpolated house number setting is allowed.
Declaration
Objective-C
- (BOOL)getEstimateMissingHouseNumbers;
Swift
func getEstimateMissingHouseNumbers() -> Bool
-
Enable or disable the easy access filter for results.
Note
Default is true.Declaration
Objective-C
- (void)setEasyAccessOnlyResults:(BOOL)state;
Swift
func setEasyAccessOnlyResults(_ state: Bool)
-
Test if easy access filter is enabled
Declaration
Objective-C
- (BOOL)getEasyAccessOnlyResults;
Swift
func getEasyAccessOnlyResults() -> Bool
-
Returns the country for the specific location.
Declaration
Objective-C
- (nonnull LandmarkObject *)addressSearchGetCountryWithCoordinates: (nonnull CoordinatesObject *)location;
Swift
func addressSearchGetCountry(withCoordinates location: CoordinatesObject) -> LandmarkObject
Parameters
location
The location object.
-
Returns the country for the specific iso code.
Declaration
Objective-C
- (nonnull LandmarkObject *)addressSearchGetCountryWithIsoCode: (nonnull NSString *)isoCode;
Swift
func addressSearchGetCountry(withIsoCode isoCode: String) -> LandmarkObject
Parameters
location
The location object.
-
Start a search address request for the given level and query.
Declaration
Objective-C
- (void)addressSearchWithLandmark:(nonnull LandmarkObject *)landmark level:(AddressLevelType)type query:(nonnull NSString *)query completionHandler: (nonnull void (^)(NSArray<LandmarkObject *> *_Nonnull)) handler;
Swift
func addressSearch(withLandmark landmark: LandmarkObject, level type: AddressLevelType, query: String) async -> [LandmarkObject]
Parameters
landmark
The landmark object.
type
The address level type.
query
The query string.
-
Start a search address countries request for the given query.
Declaration
Objective-C
- (void)addressSearchCountriesWithQuery:(nonnull NSString *)query completionHandler: (nonnull void (^)( NSArray<LandmarkObject *> *_Nonnull))handler;
Swift
func addressSearchCountries(withQuery query: String) async -> [LandmarkObject]
Parameters
query
The query string.
-
Returns true if country has state address level.
Declaration
Objective-C
- (BOOL)hasAddressSearchStateWithCountry:(nonnull LandmarkObject *)landmark;
Swift
func hasAddressSearchState(withCountry landmark: LandmarkObject) -> Bool
Parameters
landmark
The landmark country object.
-
Stop a search address request.
Declaration
Objective-C
- (void)cancelAddressSearch;
Swift
func cancelAddressSearch()
-
Stop a search countries request.
Declaration
Objective-C
- (void)cancelAddressSearchCountries;
Swift
func cancelAddressSearchCountries()
-
Returns the maximum number of matches.
Declaration
Objective-C
- (int)getAddressSearchMaximumMatches;
Swift
func getAddressSearchMaximumMatches() -> Int32
-
Set the maximum number of matches.
Declaration
Objective-C
- (void)setAddressSearchMaximumMatches:(int)value;
Swift
func setAddressSearchMaximumMatches(_ value: Int32)
-
If set to true, then the search will be done using only onboard data.
Declaration
Objective-C
- (void)setAddressSearchOnlyOnboard:(BOOL)state;
Swift
func setAddressSearchOnlyOnboard(_ state: Bool)
-
Returns the state for onboard search.
Declaration
Objective-C
- (BOOL)getAddressSearchOnlyOnboard;
Swift
func getAddressSearchOnlyOnboard() -> Bool