OnlineSearchCustomDataFactory

public enum OnlineSearchCustomDataFactory

Factory to create an Online Search client that merges results from the Online Search with Custom POI results.

Important

This is a Public Preview API. It may be changed or removed at any time.
  • Factory method for creating a Search instance that provides combined online search and custom data results.

    Note

    the total number of Custom POI records provided by all CustomPOIProvider shouldn’t exceed 5000 items.

    Declaration

    Swift

    public static func create(
        apiKey: String,
        customPOIProviders: [CustomPOIProvider],
        customAPIURL: URL? = nil,
        geopoliticalView: String? = nil
    )
        -> Search?

    Parameters

    apiKey

    API key for requesting online data.

    customPOIProviders

    Custom POI data providers that would be used to inject external POI results into the returned list of search results.

    customAPIURL

    Custom base URL for online APIs. Defaults to nil and “https://api.tomtom.com/search/2” will be the base URL. Can be used to change to another service that implements the same API.

    geopoliticalView

    The country code in the ISO 3166-1 alpha-2 format whose view on disputed areas should be used in Online search. A detailed overview of the conforming country codes is available at https://developer.tomtom.com/search-api/documentation/product-information/market-coverage. If not provided, or not supported, the international geopolitical view will be used in the Online Search. geopoliticalView is ignored for Custom POI search. Every CustomPOIProvider is responsible for defining correct POI data.

    Return Value

    a Search instance that combines online and custom POI search results.