Configuration

struct Configuration

Configuration of any TKUIRoutingResultsCard.

This isn’t created directly, but rather you modify the static instance accessible from TKUIRoutingResultsCard.config.

  • Set this to specify where the card should be placed when it’s loaded.

    Defaults to .peaking position

    Declaration

    Swift

    public var initialCardPosition: TGCardPosition
  • Set this to limit routing results to a certain transport modes.

    If this is set, the routing card will not display the Transport button, which allows users to show or hide transport modes when results are presented

    Defaults to nil, which means the SDK will read from TKUserProfile

    Declaration

    Swift

    public var limitToModes: [String]?
  • Set this to add a button for a trip group

    Called when a results card gets presented.

    Declaration

    Swift

    public var tripGroupActionFactory: ((TripGroup) -> TripGroupAction?)?
  • Set this to have a button on the results card to contact customer support when the user is encountering errors.

    Called when the user taps the button.

    Declaration

    Swift

    public var contactCustomerSupport: ((TKUIRoutingResultsCard, SupportType) -> Void)?
  • Set this to use your own map manager. You can use this in combination with TGCardViewController.builder to use a map other than Apple’s MapKit.

    Defaults to using TKUIRoutingResultsMapManager.

    Declaration

    Swift

    public var mapManagerFactory: ((MKAnnotation?, Bool) -> TKUIRoutingResultsMapManagerType)
  • An optional list of autocompletion data providers. This list will be used by an instance of TKUILocationSearchViewController, which is presented when users click on the origin or destination labels. If none was provided, the TKAppleGeocoder and TKSkedGoGeocoder will be used

    Declaration

    Swift

    public var autocompletionDataProviders: [TKAutocompleting]