[ios] show current searching results on the map

Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
Kiryl Kaveryn 2025-02-05 17:01:56 +04:00 committed by Roman Tsisyk
parent ca2d888744
commit e53dcf7716
2 changed files with 14 additions and 0 deletions

View file

@ -15,6 +15,8 @@ NS_SWIFT_NAME(Search)
+ (void)searchQuery:(NSString *)query forInputLocale:(NSString *)inputLocale withCategory:(BOOL)isCategory;
+ (void)showResultAtIndex:(NSUInteger)index;
+ (void)showEverywhereSearchResultsOnMap;
+ (void)showViewportSearchResultsOnMap;
+ (SearchItemType)resultTypeWithRow:(NSUInteger)row;
+ (NSUInteger)containerIndexWithRow:(NSUInteger)row;

View file

@ -175,6 +175,18 @@ using Observers = NSHashTable<Observer>;
return result;
}
+ (void)showEverywhereSearchResultsOnMap {
MWMSearch *manager = [MWMSearch manager];
if (![MWMRouter isRoutingActive])
GetFramework().ShowSearchResults(manager->m_everywhereResults);
}
+ (void)showViewportSearchResultsOnMap {
MWMSearch *manager = [MWMSearch manager];
if (![MWMRouter isRoutingActive])
GetFramework().ShowSearchResults(manager->m_viewportResults);
}
+ (NSArray<SearchResult *> *)getResults {
NSMutableArray<SearchResult *> * results = [[NSMutableArray alloc] initWithCapacity:MWMSearch.resultsCount];
for (NSUInteger i = 0; i < MWMSearch.resultsCount; ++i) {