Maps SDK for Web
tt.services.autocomplete
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.
Makes a search request using the TomTom Search API - Autocomplete.
Constructor
tt.services.autocomplete([options])
Parameters
| Name | Description | 
|---|---|
| options Object default:None | |
| options.center Object | Number[] | String[] | String default:None | Longitude and latitude data in one of the supported formats. This option represents a geographic coordinate. The supported formats are listed below: 
 | 
| options.countrySet String default:None | Comma separated list of country codes (e.g.: FR,ES) This option is a list of country codes used to limit the search request to those specific political limits. | 
| options.key String default:None | A valid API Key for the requested service. A valid API Key is required to make use of the given service. It can be issued in the Developer Portal. | 
| options.language String default:None | Language code that decides in which language the search results should be returned. The value should correspond to one of the supported IETF language codes. The list is available here. The code is case insensitive. | 
| options.limit Number default:10 | The maximum number of responses that will be returned. Represents the maximum number of responses that will be returned per request. The maximum value is 100. | 
| options.query String default:None | The query string. This value will be properly encoded during the creation of the request. This option represents the text that will be searched. | 
| options.radius Number default:None | A positive integer value in meters. This option specifies the search radius in meters using the coordinates given to the centeroption as origin. | 
| options.resultSet String default:None | Restricts the result space based on their segment types. A result is only included if at least one segment is of any of the indicated types. Value: A comma-separated list that consists of the types of segments. Usage examples: 
 | 
Methods
go( ): Promise
Executes a predefined asynchronous task using the current configuration.
Returns