Address & POI search
Address & POI search
Allow your users to easily search for addresses and POIs in a single step. Implement global search or near-me search in your mobile app so that it returns the best search results for your needs. Global search uses the search functionality’s default settings . It doesn’t use the user’s position or other search parameters. Sample use case: You use an app to search for a place. This search should not be limited in any way.
Use the code snippet below in your app to list general search results or display them on the map.
- (void)performAddressSearchWithQuery:(NSString *)query {
TTSearchQueryBuilder *queryBuilder = [TTSearchQueryBuilder
createWithTerm:query];
TTSearchQuery *searchQuery = [queryBuilder build];
[self.search searchWithQuery:searchQuery withAsyncDelegate:self];
}
Add the code snippet presented below to your app to get search results that are geo-biased for a given location in a range specified by a radius.
- (void)performAddressSearchWithQuery:(NSString *)query
position:(CLLocationCoordinate2D)position {
TTSearchQueryBuilder *queryBuilder = [TTSearchQueryBuilder
createWithTerm:query];
[queryBuilder withPosition:(CLLocationCoordinate2D)position withRadius:30000];
TTSearchQuery *searchQuery = [queryBuilder build];
[self.search searchWithQuery:searchQuery withAsyncDelegate:self];
}
![]() Global address search. |
![]() Near me address search. |