TomTomOnboardSearchService

public final class TomTomOnboardSearchService : SearchService
extension TomTomOnboardSearchService: OnStoreAccessChangedObserver

The TomTom Onboard Search Service provides several types of search using an onboard map.

Important

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

Lifecycle

  • TomTomOnboardSearchService init method.

    Declaration

    Swift

    public convenience init(store: MapDataStore) throws

Public

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

    Declaration

    Swift

    public func searchAlongRoute(
        query: TomTomSDKSearch.AlongRouteQuery,
        completion: @escaping (Result<TomTomSDKSearch.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 provides the capability to search places and POIs meeting various criteria.

    Declaration

    Swift

    public func search(
        query: TomTomSDKSearch.SearchQuery,
        completion: @escaping (Result<TomTomSDKSearch.SearchResponse, Error>) -> ()
    )

    Parameters

    query

    The SearchQuery object to limit the results.

    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.

    Declaration

    Swift

    public func requestPoiCategories(
        query: TomTomSDKSearch.PoiCategoryQuery,
        completion: @escaping (Result<PoiCategoryResponse, Error>) -> ()
    )
  • 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 autocompleteSearch(
        query: TomTomSDKSearch.AutocompleteQuery,
        completion: @escaping (Result<TomTomSDKSearch.AutocompleteResponse, Error>) -> ()
    )

    Parameters

    query

    The AutocompleteQuery.

    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.

  • Provides detailed information about a place based on its identifier (entityId).

    Declaration

    Swift

    public func requestPOIDetails(
        query: POIDetailsQuery,
        completion: @escaping (Result<TomTomSDKSearch.POIDetailsResponse, Error>) -> ()
    )
  • 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.

    • query: The query that defines geometries to request.
    • completion: Parameter completion: The completion closure is called after the response to the request has been processed. If no errors occurred, GeometryDataResponse contains an array of geometries data structures

    Note

    This API is not supported for onboard search so far.

    Declaration

    Swift

    public func requestGeometryData(
        query: GeometryDataQuery,
        completion: @escaping (Result<GeometryDataResponse, 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 requestEvChargingStationsAvailability(
        query: EVChargingStationsAvailabilityQuery,
        completion: @escaping (Result<
            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.

OnStoreAccessChangedObserver