SearchControllerDelegate

public protocol SearchControllerDelegate : AnyObject

Defines methods to provide location results from MapboxSearchController.

  • Selected search result in the search panel.

    Declaration

    Swift

    func searchResultSelected(_ searchResult: SearchResult)
  • Collection of results received as a response for a category search request.

    Declaration

    Swift

    func categorySearchResultsReceived(category: SearchCategory, results: [SearchResult])
  • Customer selected record from the Favorites UI tab

    Declaration

    Swift

    func userFavoriteSelected(_ userFavorite: FavoriteRecord)
  • shouldCollapseForSelection(_:) Default implementation

    Control auto-collapse behavior of the panel after result selection.

    Default Implementation

    Control auto-collapse behavior of the panel after result selection. Default true.

    Declaration

    Swift

    func shouldCollapseForSelection(_ searchResult: SearchResult) -> Bool