Maps SDK for Web
Search
Base class for all the Search services.
This service supports batch calls.
In order to make batch call, pass an object which will contain the 'key' property, 'batchMode' property set to the correct value (sync, async, or redirect) and batchItems, which will contain an array of objects which represent options for each call. For more information, please refer to batch documentation:
tt.services.<service name>({
batchMode: 'sync'
key: <Your API key>,
batchItems: [{
...
}, {
...
} //... more objects
]
})
.go()
.then(callback);
Constructor
Search([options])
Parameters
Name | Description |
---|---|
options
Object default:None |
Options to be passed to the search call, or an array of such options objects to perform a batch request. |
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:null |
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.protocol
"http" | "https" default:"https" |
The protocol type to be used in the calls. Represents the type of protocol used to perform a service call. |
Methods
go( ): Promise
Executes a predefined asynchronous task using the current configuration.
Returns