The Core bundle (`@tomtom-org/maps-sdk/core`) holds what the Map and Services bundles share: the [global configuration](https://docs.tomtom.com/maps-sdk-js/guides/core/global-config), the [place](https://docs.tomtom.com/maps-sdk-js/guides/core/places) and [route](https://docs.tomtom.com/maps-sdk-js/guides/core/routes) types, and utilities for [coordinates](https://docs.tomtom.com/maps-sdk-js/guides/core/utilities/coordinates), [bounding boxes](https://docs.tomtom.com/maps-sdk-js/guides/core/utilities/bounding-boxes), [formatting](https://docs.tomtom.com/maps-sdk-js/guides/core/utilities/formatting) and [routes](https://docs.tomtom.com/maps-sdk-js/guides/core/utilities/routes). ## Installing dependencies Core is part of the SDK package, so installing the SDK installs it: ```bash npm install @tomtom-org/maps-sdk ``` Core needs `lodash-es` and `@turf/turf` as peer dependencies. The [project setup guide](https://docs.tomtom.com/maps-sdk-js/introduction/project-setup#installing-peer-dependencies) lists them for every bundle and explains how pnpm installs them. ## Common configuration Set the API key once at startup. Every map and service call reads it: ```javascript import { TomTomConfig } from '@tomtom-org/maps-sdk/core'; TomTomConfig.instance.put({ apiKey: 'YOUR_API_KEY', language: 'en-GB' }); ``` **Before you ship, decide where this key will live.** Anyone who opens the page can read a key you use from the browser, but not one you use from Node.js. See [Where your API key runs](https://docs.tomtom.com/maps-sdk-js/guides/security/where-your-api-key-runs) for which case you are in and what to do about it, and TomTom's [API key management best practices](https://docs.tomtom.com/platform/documentation/api-best-practices/api-key-management-best-practices) for key restrictions, rotation and monitoring. The [global configuration guide](https://docs.tomtom.com/maps-sdk-js/guides/core/global-config) covers every option, how a map or a single call overrides it, and the Node.js setup. ## Using with map bundle ```javascript import { TomTomConfig } from '@tomtom-org/maps-sdk/core'; import { TomTomMap } from '@tomtom-org/maps-sdk/map'; TomTomConfig.instance.put({ apiKey: 'YOUR_API_KEY' }); const map = new TomTomMap({ mapLibre: { container: 'map' } }); ``` Next: the [map quickstart](https://docs.tomtom.com/maps-sdk-js/guides/map/quickstart). ## Using with services bundle ```javascript import { TomTomConfig } from '@tomtom-org/maps-sdk/core'; import { discoverPlaces } from '@tomtom-org/maps-sdk/services'; TomTomConfig.instance.put({ apiKey: 'YOUR_API_KEY' }); const results = await discoverPlaces({ query: 'restaurants', geoBias: { position: [4.9041, 52.3676] } }); ``` Next: the [services quickstart](https://docs.tomtom.com/maps-sdk-js/guides/services/quickstart).