Maps SDK for Web
tt.services.additionalData
Retrieve polygons (in GeoJSON format) representing administrative borders using IDs related to search results entities.
Parameters need to be passed to the constructor.
This service supports batch calls.
In order to make a batch call, pass an object containing the following properties:
- 'key' - valid API Key for the used service
- 'batchMode' - valid options: sync, async, or redirect
- 'waitTimeSeconds' - maximum waiting time for batch download response. This option only works with 'async' and 'redirect' batch modes. Accepts 120 or an integer between 5 and 60.
- 'batchItems' - array of objects with options for each call.
For more information, please refer to the batch documentation: Routing, Search.
tt.services.<service name>({
batchMode: 'sync'
key: <Your API key>,
batchItems: [{
...
}, {
...
} //... more objects
]
}).then(callback);
Constructor
tt.services.additionalData([options])
Example
tt.services.fuzzySearch({
key: <Your API key>,
query: "Amsterdam"
}).then(function(response) {
var geometryId = response.results[0].dataSources.geometry.id;
tt.services.additionalData({
key: <Your API key>,
geometries: [geometryId]
}).then(function(adpResponse) {
console.log(adpResponse);
})
});
Parameters
Name | Description |
---|---|
options
Object default:None |
|
options.geometries
String[] default:None |
An array of geometries IDs. This option specifies an array of geometries IDs. IDs can be retrieved from the response returned by search service, e.g., fuzzySearch. |
options.geometriesZoom
Number default:None |
Geometries zoom value. Must be an integer in range of 0-22 (inclusive). To see table of precision per zoom value, please refer to: Search API documentation. |
options.key
String default:None |
A valid API Key for the requested service. Key is required to make use of the given service. It can be issued in the Developer Portal. |