The TomTom API key that authenticates requests.
Requests to TomTom need it, unless a proxy adds it: see commonBaseURL for proxy-credentials
mode. Get one from my.tomtom.com.
The base URL of every TomTom request, for service calls and the style, tile, sprite and glyph URLs the map fetches.
Change it only to route those requests through a proxy of your own. If you also leave apiKey unset, the SDK
switches to proxy-credentials mode. No key then leaves the browser, and requests carry the proxy's session cookie.
It must be absolute and https:. The SDK accepts http: only for a loopback address (localhost, 127.0.0.0/8,
[::1]). Otherwise service calls reject, and the map constructor throws, with code INSECURE_BASE_URL, even
with validateRequest: false.
OptionaldisplayCustom display units for time and distance.
formatDistance and formatDuration apply them, and the SDK uses those utilities to display map information. If you don't set it, the default unit labels apply.
OptionalgeopoliticalThe geopolitical view of the map and service results, which sets whose perspective disputed territories are shown from.
If you don't set it, each TomTom API picks the default view for the country the request comes from.
OptionallanguageThe language of SDK services and map content.
It accepts IETF language codes, case-insensitive, and affects search results, routing instructions, map labels and traffic incident descriptions.
OptionalretryHow the SDK retries rate-limited (429) responses.
By default, the SDK retries requests that receive a 429 status code with exponential backoff.
A field you leave out takes its default. To turn retrying off, set it to undefined.
OptionalsendWhether requests to TomTom carry the tomtom-user-agent header, naming the SDK and its version.
TomTom reads it to tell which SDK versions are in use. Turn it off when that header must not leave the page, or when a proxy of yours should not have to allow it in its CORS preflight answer. A map reads it at construction. Its image requests (sprite sheets, raster tiles) never carry the header.
The global configuration of the TomTom Maps SDK.
It holds the API key, language, display preferences and other settings that apply to all SDK services and the map.
Remarks
You set it with TomTomConfig. The SDK merges it with each service's configuration, and the service configuration takes precedence.
Example