TomTomOnlineSearchService

public class TomTomOnlineSearchService : SearchService
extension TomTomOnlineSearchService: AdditionalQueryItemProvider

The TomTom Search Service is a REST wrapper for a suite of web services that allow developers to use our scalable search engine.

Important

This is a Public Preview API. It may be changed or removed at any time.

Lifecycle

  • TomTomOnlineSearchService init method.

    Declaration

    Swift

    public init()

Public

  • This service allows you to perform a fuzzy search for POIs along a specified route.

    Declaration

    Swift

    public func alongRoute(query: AlongRouteQuery, completion: @escaping (SearchResponse?, Error?) -> ())

    Parameters

    query

    The AlongRouteQuery. Query can be made using AlongRouteQueryBuilder.

    completion

    The completion closure is called after the response to the request has been processed. If no errors occurred, SearchResponse contains an array of search result and summary information.

  • This service handles the most fuzzy of inputs containing any combination of Indexes abbreviation values. Additional search parameters like position, radius, openingHours, etc. can be taken into account using FuzzySearchQuery.

    Declaration

    Swift

    public func fuzzySearch(query: FuzzySearchQuery, completion: @escaping (SearchResponse?, Error?) -> ())

    Parameters

    query

    The FuzzySearchQuery. Query can be made using FuzzySearchQueryBuilder.

    completion

    The completion closure is called after the response to the request has been processed. If no errors occurred, SearchResponse contains an array of search results and summary information.

  • The Geometry Search endpoint allows you to perform a free form search inside a single geometry or many of them.

    Declaration

    Swift

    public func geometrySearch(query: GeometrySearchQuery, completion: @escaping (SearchResponse?, Error?) -> ())

    Parameters

    query

    The GeometrySearchQuery. Query can be made using GeometrySearchQueryBuilder.

    completion

    The completion closure is called after the response to the request has been processed. If no errors occurred, SearchResponse contains an array of search results and summary information.

  • This service provides a full list of POI categories and subcategories together with their translations and synonyms. Additional POI category parameters like language can be taken into account using the POICategoriesQuery.

    Declaration

    Swift

    public func poiCategories(query: POICategoriesQuery, completion: @escaping (POICategoriesResponse?, Error?) -> ())

    Parameters

    query

    The POICategoriesQuery. Query can be made using POICategoriesQueryBuilder.

    completion

    The completion closure is called after the response to the request has been processed. If no errors occurred, POICategoriesResponse contains an array of categories and subcategories together with their translations and synonyms.

  • The Autocomplete API enables you to make a more meaningful Search API call by recognizing entities inside an input query and offering them as query terms.

    Declaration

    Swift

    public func autocomplete(query: AutocompleteQuery, completion: @escaping (AutocompleteResponse?, Error?) -> ())

    Parameters

    query

    The AutocompleteQuery. That can be done using: AutocompleteQueryBuilder

    completion

    The completion closure is called after the response to the request has been processed. If no errors occurred, AutocompleteResponse contains proposed autocomplete elements, that can be used to implement an input field with the autocomplete feature.

  • The Place by ID service endpoint provides detailed information about a place based on its identifier (entityId).

    If no errors occurred, SearchResponse contains an array of categories and subcategories together with their translations and synonyms.

    Declaration

    Swift

    public func placeByID(query: PlaceByIDQuery, completion: @escaping (SearchResponse?, Error?) -> ())

    Parameters

    query

    The PlaceByIDQuery. That can be made using: PlacebyIDQueryBuilder.

    completion

    The completion closure is called after the response to the request has been processed.

  • The Geometries Data Provider returns sets of coordinates that represent the outline of a city, country, or land area. The service supports batch requests of up to 20 identifiers.

    Declaration

    Swift

    public func additionalData(
        query: AdditionalDataQuery,
        completion: @escaping (AdditionalDataResponse?, Error?) -> ()
    )
  • The EV Charging Stations Availability endpoint provides information about the current availability of charging points, grouped by connector type and then power level. The response can be filtered by connector type and a range of charging powers, if provided (using optional request parameters).

    Declaration

    Swift

    public func evChargingStationsAvailability(
        query: EVChargingStationsAvailabilityQuery,
        completion: @escaping (EVChargingStationsAvailabilityResponse?, Error?)
            -> ()
    )

    Parameters

    query

    The EVChargingStationsAvailabilityQuery. Can be made using EVChargingStationsAvailabilityQueryBuilder.

    completion

    Parameter completion: The completion closure is called after the response to the request has been processed. If no errors occurred, SearchResponse contains an array of categories and subcategories together with their translations and synonyms.