Maps SDK for Web

tt.services.geocode

Allows requests to be made using the TomTom's Search API - Geocode.

Parameters need to be passed to the constructor. The method go performs the actual call.

The SDK provides a Promise polyfill for browsers (IE<9) without native ECMAScript 6 support.

Constructor

tt.services.geocode([options])

Example
function callbackFn(result) {
  console.log(result);
};
tt.services.geocode({
  key: <Your API Key>,
  query: 'Amsterdam, The Netherlands'
})
.go()
.then(callbackFn);
Parameters
Name Description
options
Object
default:None
Options to be passed to the geocode call, or an array of such option objects to perform a batch request.

Methods

go( ): Promise

Executes a predefined asynchronous task using the current configuration.

Returns