ConstMost developers won't need to use this directly. The standard service functions
(like geocode, search, calculateRoute) are sufficient for typical use cases.
Only use customization when you need to modify the internal service behavior.
Each service exposes:
import { mergeFromGlobal } from '@tomtom-org/maps-sdk/core';
import { customizeService } from '@tomtom-org/maps-sdk/services';
const { buildGeocodingRequest, parseGeocodingResponse } = customizeService.geocode;
// Request builders expect the global configuration to be merged in already
const url = buildGeocodingRequest(mergeFromGlobal({ query: 'Amsterdam' }));
// Send the request yourself, then parse the raw API payload
const apiResponse = await fetch(url);
const places = parseGeocodingResponse(await apiResponse.json());
Access to service implementation components for advanced customization.
This object provides low-level access to the internal components of each service, allowing developers to customize request building, response parsing, and other aspects of service behavior. This is useful for advanced use cases like: