MapboxSearchController

public class MapboxSearchController : UIViewController
extension MapboxSearchController: SearchEngineDelegate

Undocumented

  • Undocumented

    Declaration

    Swift

    public var favoritesProvider: FavoritesProvider
  • Undocumented

    Declaration

    Swift

    public var historyProvider: HistoryProvider
  • Undocumented

    Declaration

    Swift

    public var categorySearchEngine: CategorySearchEngine
  • Undocumented

    Declaration

    Swift

    public var searchEngine: SearchEngine { get set }
  • Options used to customize search, nil by default.

    Declaration

    Swift

    public var searchOptions: SearchOptions?
  • Options used to customize category search, nil by default.

    Declaration

    Swift

    public var categorySearchOptions: SearchOptions?
  • Undocumented

    Declaration

    Swift

    public var configuration: Configuration { get set }
  • Undocumented

    Declaration

    Swift

    public weak var delegate: SearchControllerDelegate?
  • Instantiate MapboxSearchController with explicit accessToken and custom location provider

    Declaration

    Swift

    public required init(accessToken: String, configuration: Configuration = Configuration())

    Parameters

    accessToken

    Mapbox public access token. Checkout init(locationProvider:) to

    configuration

    configuration for search and categorySearch engines.

  • MapboxSearchController initializer with accessToken taken from application Info.plist

    Access token is expected to be at MGLMapboxAccessToken key in application Info.plist. Missing accessToken will trigger fatalError

    Declaration

    Swift

    public required init(configuration: Configuration = Configuration())

    Parameters

    configuration

    configuration for search and categorySearch engines.

  • Undocumented

    Declaration

    Swift

    public override func viewDidLoad()
  • Undocumented

    Declaration

    Swift

    public override func viewWillAppear(_ animated: Bool)
  • Undocumented

    Declaration

    Swift

    public override func viewDidDisappear(_ animated: Bool)
  • Presentation styles for MapboxSearchController. Non-animated

    See more

    Declaration

    Swift

    enum PresentationStyle
  • Get access to the MapboxPanelController for .panel presentation style

    Declaration

    Swift

    var panelController: MapboxPanelController? { get }
  • Show Mapbox Search Controller inside of target view controller

    Declaration

    Swift

    func present(in rootVC: UIViewController, presentationStyle: PresentationStyle = .panel)

    Parameters

    rootVC

    ViewController to be root of Search Controller

    presentationStyle

    Choose one of the presentation styles. Default is .panel

  • Reset MapboxSearchController state recursively

    Declaration

    Swift

    func resetSearchUI(animated: Bool, collapse: MapboxPanelController.State? = .collapsed)

    Parameters

    animated

    Should changes be animated

    collapse

    Change the collapsing status. Pass nil to not apply status changes. Default: .collapsed