OfflineSearch
@available(*, deprecated, message: " This API is deprecated and will be removed with the next major release.\n Please use OfflineSearchFactory.create(﹚ instead.")
public final class OfflineSearch : Search
The Offline Search API provides several types of search using an offline map.
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
@discardableResult
public func autocomplete(
options: AutocompleteOptions,
completion: @escaping (Result<AutocompleteResponse, Error>) -> ()
)
-> TomTomSDKCommon.Cancellable
Parameters
options
|
The |
completion
|
The completion closure is called after the response to the request has been processed.
If no errors occurred, |
Return Value
a Cancellable
instance that provides control for request cancellation.
This method provides the capability to search EV charging stations meeting various criteria.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
@discardableResult
public func evSearch(options: EVSearchOptions, completion: @escaping (Result<EVSearchResponse, Error>) -> ())
-> Cancellable
Parameters
options
|
The |
completion
|
The completion closure is called after the request response is processed.
If no errors occurred, |
Return Value
a Cancellable
instance that provides control for request cancellation.
Creates a new OfflineSearch
instance.
Throws
An error ifNDSStore
is invalid.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public convenience init(
store: NDSStore,
customPOIProviders: [CustomPOIProvider] = []
) throws
Parameters
store
|
a |
customPOIProviders
|
Custom data providers for injecting external POI data into the search engine. |
The Geometry Data API returns sets of coordinates that represent the outline of a city, country, or land area. The API supports batch requests of up to 20 identifiers.
Note
This API is not supported for offline search so far.Declaration
Swift
@discardableResult
public func requestGeometryData(
options: GeometryDataOptions,
completion: @escaping (Result<GeometryDataResponse, Error>) -> ()
)
-> TomTomSDKCommon.Cancellable
Parameters
options
|
The structure 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, |
Return Value
a Cancellable
instance that provides control for request cancellation.
This API provides a list of POI categories.
Declaration
Swift
@discardableResult
public func requestPOICategories(
options: POICategoryOptions,
completion: @escaping (Result<POICategoryResponse, Error>) -> ()
)
-> TomTomSDKCommon.Cancellable
Parameters
options
|
The |
completion
|
The completion closure is called after the response to the request has been processed.
If no errors occurred, |
Return Value
a Cancellable
instance that provides control for request cancellation.
This API provides detailed information about a place based on its identifier (entityId).
Declaration
Swift
@discardableResult
public func requestPOIDetails(
options: POIDetailsOptions,
completion: @escaping (Result<TomTomSDKSearch.POIDetailsResponse, Error>) -> ()
)
-> TomTomSDKCommon.Cancellable
Parameters
options
|
Describes what POI Details data to request. |
completion
|
The completion closure is called after the response to the request has been processed.
If no errors occurred, |
Return Value
a Cancellable
instance that provides control for request cancellation.
This API allows to search places and POIs meeting various criteria.
Declaration
Swift
@discardableResult
public func search(
options: SearchOptions,
completion: @escaping (Result<SearchResponse, Error>) -> ()
)
-> TomTomSDKCommon.Cancellable
Parameters
options
|
The |
completion
|
The completion closure is called after the response to the request has been processed.
If no errors occurred, |
Return Value
a Cancellable
instance that provides control for request cancellation.
Asynchronously sends a feedback event for the search.
Declaration
Swift
@discardableResult
public func sendFeedback(
feedbackEvent: TomTomSDKSearch.FeedbackEvent, completion: ((Error?) -> ())? = nil
)
-> TomTomSDKCommon.Cancellable
Parameters
feedbackEvent
|
The feedback event. |
completion
|
If an error occurred, |
Return Value
a Cancellable
instance that provides control for request cancellation.