@tomtom-org/maps-sdk 0.64.0 → 1.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,77 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0-rc.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#2482](https://github.com/tomtom-internal/maps-sdk-js/pull/2482) [`e6590f2`](https://github.com/tomtom-internal/maps-sdk-js/commit/e6590f20417dea946a55d3201d50d29ce32a9697) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - core, services, map: 1.0.0, the first stable release of the SDK. The *Upgrading to 1.0 from a 0.x release* guide lists every change to apply from a 0.x release.
8
+
9
+ ### Minor Changes
10
+
11
+ - [#2490](https://github.com/tomtom-internal/maps-sdk-js/pull/2490) [`62c5726`](https://github.com/tomtom-internal/maps-sdk-js/commit/62c572635b97c084af81b08b2b6b84f338c193ca) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - **Breaking:** core, services, map: the error codes take the TomTom Navigation SDK's names: `API_KEY_REJECTED` is `INVALID_CREDENTIALS`, `SERVICE_UNAVAILABLE` is `LIVE_SERVICE_NOT_AVAILABLE`, `NETWORK_ERROR` is `NETWORK_NOT_AVAILABLE` and `UNEXPECTED` is `INTERNAL`
12
+ **Breaking:** core, services, map: a `403` is `INSUFFICIENT_PERMISSIONS`, a valid key not allowed the request, and `INVALID_CREDENTIALS` is a `401` only, a key the API does not know
13
+ - services, map: `SDKError.canRetry` and `TomTomMapError.canRetry` are `true` for `RATE_LIMITED`, `LIVE_SERVICE_NOT_AVAILABLE` and `NETWORK_NOT_AVAILABLE`, the failures that clear on their own
14
+ - services: a `403` keeps the API's message, and `SDKServiceError.apiErrorCode` holds the API's own code: `'Forbidden'` when the API is not enabled for the key, `'InvalidReferer'` when its domain restriction refused the page
15
+ - services: `calculateReachableRange` and `calculateReachableRanges`, in Private Preview, name the access a key lacks, and link the Private Preview terms, in the message; the access is also in `SDKServiceError.privatePreviewAccess`, `{ product, requestAccessURL }`
16
+ - map: a style, tile, sprite or glyph answered `403` reaches the error handlers as `INSUFFICIENT_PERMISSIONS`
17
+
18
+ - [#2512](https://github.com/tomtom-internal/maps-sdk-js/pull/2512) [`f8e49db`](https://github.com/tomtom-internal/maps-sdk-js/commit/f8e49dbf1876097b2a0c62cf5e6c1e1feb494178) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - **Breaking:** map: the sky, space, incident delay and hillshade knobs are named as every other knob is: a part's settings sit under it, and no name repeats its parent
19
+ - map: `StylingFoundationsModule` knob ids `view.sky`, `view.skyColor`, `view.horizonColor` and `view.spaceColor` are `view.sky.visible`, `view.sky.color`, `view.sky.horizonColor` and `view.space.color`, in `styleColorKnobIds`, `getStyleColor` and map presets too
20
+ - map: `TrafficIncidentsModule` `filters: { delays: { mustHaveDelay, minDelayMinutes } }` is `filters: { delays: { required, minMinutes } }`, and the knob ids follow
21
+ - map: `TerrainModule` `hillshade: { lightDirection, exaggeration, shadowColor, highlightColor, accentColor }` is `hillshade: { light: { direction }, intensity, colors: { shaded, lit, steep } }`, and the knob ids follow, in `styleColorKnobIds` and `getStyleColor` too; `exaggeration` is now only the raised surface's vertical scale
22
+ - agent-toolkit: `setMapStyling`'s globe example sets `view.sky.visible`
23
+
24
+ - [#2485](https://github.com/tomtom-internal/maps-sdk-js/pull/2485) [`ac09c1e`](https://github.com/tomtom-internal/maps-sdk-js/commit/ac09c1e37d192837467d6575ce8bc99464e11455) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - **Breaking:** map: `PlacesKnob` and the traffic knob types list only the kinds their catalogues hold, so a `switch` over their `kind` drops the cases no entry reaches
25
+ - `PlacesKnob` no longer includes `text`
26
+ - `TrafficFlowKnob`, `TrafficIncidentsKnob`, `TrafficIncidentDetailsKnob` and `TrafficAreaAnalyticsKnob` no longer include `image`
27
+
28
+ - [#2505](https://github.com/tomtom-internal/maps-sdk-js/pull/2505) [`308c3af`](https://github.com/tomtom-internal/maps-sdk-js/commit/308c3af3a5375b12293b2018413f4f78286739d6) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - **Breaking:** map: the last config properties and knob ids off the shared vocabulary follow it: a size preset is a `*Preset`, a fill style sits under `fill`, and a unit is named once
29
+ - map: `GeometriesModule` and `ReachableRangesModule` take `fill: { style }` instead of `fillStyle`, and `TrafficAreaAnalyticsModule` `regionPolygon: { fill: { style } }` instead of `regionPolygon.fillStyle`; a feature's `properties.fillStyle` stays
30
+ - map: `RoutingModule` `width`, `sections.<type>.width` and `waypoints.size` are `widthPreset`, `sections.<type>.widthPreset` and `waypoints.sizePreset`
31
+ - map: `PlacesModule` `cluster.source` takes `radius`, `maxZoom`, `minPoints` and `properties` instead of MapLibre's `clusterRadius`, `clusterMaxZoom`, `clusterMinPoints` and `clusterProperties`, typed by `PlacesClusterSourceConfig`
32
+ - map: `PlacesModule` `label.offset` is `label.distance`, since an `offset` is an `[x, y]` displacement on every module
33
+ - map: `TrafficAreaAnalyticsModule` `height.maxHeightMeters` and `height.minHeightMeters` are `height.maxMeters` and `height.minMeters`, in `setHeight` too
34
+ - map: each renamed property's knob id follows it
35
+ - agent-toolkit: the tools keep their parameters, and the plugin needs SDK 1.0.0-rc.0
36
+
37
+ - [#2489](https://github.com/tomtom-internal/maps-sdk-js/pull/2489) [`640b53b`](https://github.com/tomtom-internal/maps-sdk-js/commit/640b53bf1c0ea20ce996053ee2f1a664310a381d) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - **Breaking:** map: the map loads TomTom standard styles only, so a custom style URL or style JSON no longer loads
38
+ - `StyleInput` no longer takes `{ type: 'custom', url }` or `{ type: 'custom', json }`, and `CustomStyle` and `CustomStyleSource` are no longer exported
39
+ - `lightDarkTheme` is gone with them: `map.styleLightDarkTheme` follows from the standard style ID
40
+ - Restyle a standard style at runtime with `StylingFoundationsModule` and `setMapColors` instead
41
+
42
+ - [#2495](https://github.com/tomtom-internal/maps-sdk-js/pull/2495) [`530b895`](https://github.com/tomtom-internal/maps-sdk-js/commit/530b8955ebe0d6724b9dc14d5a0d08a37e4b4df8) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - **Breaking:** core, services, map: the SDK no longer offers real-time EV charging availability, nor routes and reachable ranges planned on a vehicle consumption model; search results keep their static EV station data
43
+ - services: `evChargingStationsAvailability`, `getPlacesWithEVAvailability`, `getPlaceWithEVAvailability` and `hasChargingAvailability` are removed
44
+ - services: long-distance EV routing is removed: `vehicle.preferences`, `chargingStopsStrategy` and `chargingStopsStrategies`
45
+ - services: `vehicle` takes `model.dimensions.weightKG`, `state.heading` and `restrictions` only: `engineType`, `model.engine`, `model.variantId` and the charge and fuel state are removed, with the electric, combustion and generic vehicle types
46
+ - core: the reachable-range budgets `remainingChargePCT`, `spentChargePCT` and `spentFuelLiters` are removed; a budget is `timeMinutes` or `distanceKM`
47
+ - core: route and leg summaries lose their battery, charge and fuel fields and `chargingInformationAtEndOfLeg`, with `ChargingStop`
48
+ - core: `ChargingPark.availability`, `ChargingPoint.status` and `dataSources.chargingAvailability` are removed; `StaticChargingPoint` becomes `ChargingPoint`, and `ChargingStation` takes no type parameter
49
+ - map: `PlacesModule` loses `evAvailability`, `categoryIcons` entries lose `availabilityLevel`, and `RoutingModule` loses `chargingStops`, with their knobs, events and shown data
50
+
51
+ The *Upgrading to 1.0 from a 0.x release* guide lists every removed name.
52
+
53
+ - [#2507](https://github.com/tomtom-internal/maps-sdk-js/pull/2507) [`9ab7e7c`](https://github.com/tomtom-internal/maps-sdk-js/commit/9ab7e7c4e5e97950f9c6ba06ff228ac99393a3d4) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - **Breaking:** map: each standard style ID is the Orbis style it loads, in camelCase
54
+ - map: `standardLight`, `standardDark`, `drivingLight`, `drivingDark` and `satellite` are `streetLight`, `streetDark`, `streetLightDriving`, `streetDarkDriving` and `streetSatellite`; `monoLight` and `monoDark` stay
55
+ - agent-toolkit: `setMapStandardStyle` takes the new IDs, `resetState` reverts to `streetLight`, and the plugin needs SDK 1.0.0-rc.0
56
+ - map-theme, landmarks-3d: their docs name the new IDs
57
+
58
+ ### Patch Changes
59
+
60
+ - [#2500](https://github.com/tomtom-internal/maps-sdk-js/pull/2500) [`d19d11d`](https://github.com/tomtom-internal/maps-sdk-js/commit/d19d11d41546bac2dd870560b9508bb0b3a2ce2a) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: the `maplibre-gl` peer dependency moves up to `^6.12.0`
61
+
62
+ - [#2506](https://github.com/tomtom-internal/maps-sdk-js/pull/2506) [`12099bd`](https://github.com/tomtom-internal/maps-sdk-js/commit/12099bdc040f3ce2d3990266bfb42024cda7956c) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - core, services, map: the package ships without source maps, so a stack trace through the SDK points into its minified bundles, which keep their function names
63
+ - An app's own source maps still lead a trace to the SDK's frames (`map/dist/map.es.js:1:84523`); share such a trace in a report and TomTom maps it back to the source
64
+
65
+ - [#2505](https://github.com/tomtom-internal/maps-sdk-js/pull/2505) [`308c3af`](https://github.com/tomtom-internal/maps-sdk-js/commit/308c3af3a5375b12293b2018413f4f78286739d6) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: `TerrainModule` sets the hillshade light's height and what its direction turns with, and the `multidirectional` method fans its four lights around the light's direction
66
+ - map: `hillshade.light.altitude`, in degrees above the horizon, and `hillshade.light.alignment`, `viewport` or `map` (`hillshadeLightAlignments`), in the config and as `terrainKnobCatalogue` knobs
67
+ - map: with `method: 'multidirectional'`, `hillshade.light.direction` is the centre of four lights spread over 135°
68
+
69
+ - [#2503](https://github.com/tomtom-internal/maps-sdk-js/pull/2503) [`a472dd0`](https://github.com/tomtom-internal/maps-sdk-js/commit/a472dd0183bbb6fb9c0da96ee18363e17b903b1f) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: `TrafficIncidentsModule` can show planned incidents, and its incident descriptions follow the map language
70
+
71
+ - `timeValidity: ['present', 'future']` brings scheduled roadworks and closures in next to the incidents under way, also as the `timeValidity` knob
72
+ - `description` is in the map language, or the nearest one the traffic service has (`pt-PT` for `pt-BR`), else English; `map.setLanguage` reloads the incident tiles when that changes
73
+ - core: `trafficIncidentTimeValidities` lists every `TrafficIncidentTimeValidity`, `present` first
74
+
3
75
  ## 0.64.0
4
76
 
5
77
  ### Minor Changes
package/LICENSE.txt CHANGED
@@ -1,8 +1,8 @@
1
1
  TOMTOM MAPS SDK FOR JAVASCRIPT LICENSE AGREEMENT (“AGREEMENT”)
2
2
 
3
- Last update: September 2026
3
+ Last update: October 2026
4
4
 
5
- By downloading or accessing the “TomTom Maps SDK for JavaScript” (the “SDK”), you are entering into a binding agreement with TomTom Global Content B.V. (“TomTom”). The SDK comprises all software, binaries and source code made available by TomTom for it, whether through the TomTom Developer Portal or public code repositories (e.g. GitHub). This Agreement with TomTom consists of the terms and conditions below together with the Data Processing Schedule. You should not use the SDK if you cannot agree to both.
5
+ By downloading or accessing the “TomTom Maps SDK for JavaScript” (the “SDK”), you are entering into a binding agreement with TomTom Global Content B.V. (“TomTom”). The SDK comprises all software, binaries and source code made available by TomTom for it, whether through the TomTom Developer Portal, package registries (e.g. npm) or otherwise. The example applications that TomTom publishes in public code repositories (e.g. GitHub) are not part of the SDK: they are licensed separately, under the license distributed with them. This Agreement with TomTom consists of the terms and conditions below together with the Data Processing Schedule. You should not use the SDK if you cannot agree to both.
6
6
 
7
7
  You may not use the SDK or accept this Agreement if you are barred from receiving it under the laws of the European Union or of any other country, including the country in which you are resident or from which you use the SDK. If you accept this Agreement on behalf of your employer or another entity, you represent and warrant that you have full legal authority to bind that employer or entity. If you do not have that authority, you may not accept this Agreement or use the SDK on their behalf.
8
8
 
@@ -14,7 +14,7 @@ You may not use the SDK or accept this Agreement if you are barred from receivin
14
14
 
15
15
  3.1. You agree to use the SDK only for purposes permitted by (a) this Agreement and (b) any applicable law, regulation or generally accepted practice or guideline in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
16
16
 
17
- 3.2. Other than as permitted by applicable legislation, you are prohibited from copying (except for backup purposes), modifying, adapting, (re)distributing, renting, lending, publicly presenting, decompiling, reverse engineering, disassembling or creating derivative works of the SDK or any part of it. Notwithstanding the foregoing, where the SDK is hosted on a public repository (e.g. GitHub, which allows forking under its terms of service), you may: (i) fork the repository solely for the purpose of submitting a pull request to TomTom, provided that such fork remains hosted within the platform and is not used as a basis for a separate or competing product or service; and (ii) download a local copy of the source code solely for the purpose of debugging your Permitted Application, provided that such copy is not shared or redistributed. The availability of the source code in a public repository does not constitute “Open-Source” licensing and grants you no rights under any Open Source Initiative (OSI) approved license. Neither that availability, nor any rights granted by the platform’s terms of service with respect to viewing or forking within the platform, shall be construed as a grant of rights to modify, fork or redistribute the SDK beyond those expressly granted in Clause 1 and this Clause 3.2.
17
+ 3.2. Other than as permitted by applicable legislation, you are prohibited from copying (except for backup purposes), modifying, adapting, (re)distributing, renting, lending, publicly presenting, decompiling, reverse engineering, disassembling or creating derivative works of the SDK or any part of it. Notwithstanding the foregoing, you may inspect the SDK as distributed to you, including any source code embedded in its source maps, solely for the purpose of debugging your Permitted Application, provided that it is not shared or redistributed. The readability of the SDK’s source code in its distribution does not constitute “Open-Source” licensing and grants you no rights under any Open Source Initiative (OSI) approved license, nor shall it be construed as a grant of rights to modify, fork or redistribute the SDK beyond those expressly granted in Clause 1 and this Clause 3.2.
18
18
 
19
19
  3.3. You may not use the SDK in connection with any illegal, fraudulent, dishonest or unethical activity or behaviour, and in particular not to create or develop, or help others create or develop, a product, service or library that competes, directly or indirectly, with the SDK or the TomTom APIs.
20
20
 
@@ -78,7 +78,7 @@ You may not use the SDK or accept this Agreement if you are barred from receivin
78
78
 
79
79
  11.4. The TomTom APIs and the SDK are provided as “Commercial Computer Software” or “restricted computer software”. Use, duplication or disclosure by the U.S. Government or a U.S. Government subcontractor is subject to the restrictions set forth in 48 C.F.R. Section 12.212 or 48 C.F.R. 227.2702, as applicable, or successor provisions. In respect of the Map API and Search API, the manufacturer is TomTom Global Content B.V.
80
80
 
81
- 11.5. By submitting any suggestion, bug fix or code contribution (“Contribution”) to TomTom (e.g. via a GitHub Pull Request), you grant TomTom a perpetual, irrevocable, worldwide, royalty-free and non-exclusive license to use, reproduce, modify and distribute the Contribution as part of the SDK. You represent that you have the legal right to grant this license and that the Contribution does not infringe any third-party intellectual property rights.
81
+ 11.5. By submitting any suggestion, bug fix or code contribution (“Contribution”) to TomTom (e.g. via a GitHub issue or discussion), you grant TomTom a perpetual, irrevocable, worldwide, royalty-free and non-exclusive license to use, reproduce, modify and distribute the Contribution as part of the SDK. You represent that you have the legal right to grant this license and that the Contribution does not infringe any third-party intellectual property rights.
82
82
 
83
83
  THIRD PARTY SOFTWARE NOTICES
84
84
 
package/README.md CHANGED
@@ -2,159 +2,177 @@
2
2
 
3
3
  # TomTom Maps SDK for JavaScript
4
4
 
5
- [🎮 **Examples**](https://docs.tomtom.com/maps-sdk-js/examples/) |
6
- [📖 **Documentation**](https://docs.tomtom.com/maps-sdk-js/introduction/overview) |
7
- [📋 **API Reference**](https://docs.tomtom.com/maps-sdk-js/api-reference/index.html) |
8
- [🐙 **GitHub**](https://github.com/tomtom-international/maps-sdk-js)
5
+ [**Examples**](https://docs.tomtom.com/maps-sdk-js/examples/) |
6
+ [**Documentation**](https://docs.tomtom.com/maps-sdk-js/introduction/overview) |
7
+ [**API reference**](https://docs.tomtom.com/maps-sdk-js/api-reference/index.html) |
8
+ [**Release notes**](https://docs.tomtom.com/maps-sdk-js/introduction/release-notes)
9
9
 
10
10
  [![NPM Version](https://img.shields.io/npm/v/@tomtom-org/maps-sdk.svg)](https://www.npmjs.com/package/@tomtom-org/maps-sdk)
11
11
 
12
12
  ![SDK Examples Collage](https://raw.githubusercontent.com/tomtom-international/maps-sdk-js/main/sdk-examples-collage.png)
13
13
 
14
- TomTom Maps SDK for JavaScript is a **JavaScript** library for building applications using [**TomTom** location maps and services](https://docs.tomtom.com/).
14
+ **Maps SDK for JavaScript** is a **JavaScript/TypeScript** library for building applications with **TomTom** maps and location APIs.
15
15
 
16
- [//]: # ([![SDK Example Thumbnails]&#40;./sdk-examples-collage.png&#41;]&#40;https://docs.tomtom.com/maps-sdk-js/examples/&#41;)
16
+ It is built on [MapLibre GL JS](https://docs.tomtom.com/maps-sdk-js/guides/map/about-maplibre) and [GeoJSON](https://geojson.org/): TomTom maps and services work together out of the box, and the MapLibre map stays fully exposed, so its API and plugin ecosystem work alongside the SDK.
17
17
 
18
- It leverages the power of [MapLibre GL JS](https://github.com/maplibre/maplibre-gl-js) and [GeoJSON](https://geojson.org/)
19
- to seamlessly integrate TomTom maps and services with convenient out-of-the-box support, while staying highly customizable and extensible.
20
- <br/><br/>
18
+ > Some capabilities of the SDK are released under [Public Preview](https://docs.tomtom.com/legal/public-preview) to collect feedback from the community. The [release notes](https://docs.tomtom.com/maps-sdk-js/introduction/release-notes) list what changes in each release.
21
19
 
22
- ## ⚠️ Public Preview Notice
23
- We have released some capabilities in the Maps SDK under [Public Preview](https://docs.tomtom.com/legal/public-preview) to collect feedback from the community.
24
- - While our goal is to keep the design of the interface stable, breaking changes will occur, particularly in the earlier versions.
25
- - The versions will follow a 0.MAJOR.MINOR pattern for the time being.
26
- - Stay tuned with our release `CHANGELOG.md` files.
27
- <br/><br/>
20
+ ## Quickstart
28
21
 
29
- ## 🚀 Getting Started
22
+ 1. **Get your TomTom API key** at [my.tomtom.com](https://my.tomtom.com/), following [these instructions](https://docs.tomtom.com/platform/documentation/dashboard/api-key-management). Before you ship, decide [where your API key runs](https://docs.tomtom.com/maps-sdk-js/guides/security/where-your-api-key-runs).
30
23
 
31
- ```bash
32
- # npm and Yarn install the peer dependencies for you
33
- npm i @tomtom-org/maps-sdk
24
+ 2. **Install the SDK:**
34
25
 
35
- # pnpm does not, unless you ask it to
36
- echo "auto-install-peers=true" >> .npmrc && pnpm add @tomtom-org/maps-sdk
37
- ```
26
+ ```bash
27
+ # npm and Yarn install the peer dependencies for you
28
+ npm install @tomtom-org/maps-sdk
38
29
 
39
- **Requirements**: a [TomTom API key](https://my.tomtom.com/) · Node.js 24+ at install time (the package's `engines` floor, browser target or not) · a WebGL-capable browser for the Map bundle.
30
+ # pnpm does not, unless you ask it to
31
+ echo "auto-install-peers=true" >> .npmrc && pnpm add @tomtom-org/maps-sdk
32
+ ```
40
33
 
41
- **Peer dependencies**, installed by the commands above: `maplibre-gl` v6 (rendering), `@turf/turf` v7 (geospatial analysis), `culori` v4 (colour maths), `lodash-es` v4, `zod` v4.
34
+ 3. **Using an AI coding agent? Install the SDK skill** in your project root, for Claude Code, Cursor, GitHub Copilot, Windsurf and [many more](https://www.npmjs.com/package/skills#available-agents):
42
35
 
43
- **TypeScript declarations ship with the package** — no `@types/…` to install, and the types are the primary API documentation.
44
- <br/><br/>
36
+ ```bash
37
+ npx skills add tomtom-international/maps-sdk-js --skill tomtom-maps-sdk-js
38
+ ```
45
39
 
46
- ## 🧭 What you can build
40
+ The skill loads the SDK's patterns, coordinate conventions, service APIs and pitfalls into the agent's context, so the agent writes code against the real API instead of guessing it. Commit it so the whole team gets it. [AI coding with the SDK](https://docs.tomtom.com/maps-sdk-js/guides/ai-coding) lists the topics it covers and how to invoke them.
47
41
 
48
- **Map** (`@tomtom-org/maps-sdk/map`, browser) — an interactive vector map in seven TomTom styles (`standardLight`, `standardDark`, `monoLight`, `monoDark`, `drivingLight`, `drivingDark`, `satellite`), switchable at runtime, plus:
42
+ 4. **Start building.** Services return GeoJSON, and map modules show it unchanged:
49
43
 
50
- - **Search results and markers** — `PlacesModule`, with base-map POI icons from `POIsModule`
51
- - **Routes, waypoints and route sections** — `RoutingModule`
52
- - **Polygons and administrative boundaries** — `GeometriesModule`
53
- - **Reachable-range areas**, banded in the map's colours — `ReachableRangesModule`
54
- - **Your own GeoJSON (BYOD)** — `CustomGeoJSONModule`
55
- - **Traffic** — flow (`TrafficFlowModule`), incidents (`TrafficIncidentsModule`, `TrafficIncidentDetailsModule`) and area analytics (`TrafficAreaAnalyticsModule`)
56
- - **Terrain** — hillshade shading and 3D elevation, `TerrainModule`
57
- - **Styling** — label sizes, road widths, colours and presets with `StylingFoundationsModule`; base-map layer groups such as 3D buildings with `BaseMapModule`
58
- - **Click, hover and context-menu events**, one typed surface per module — `module.events.on(…)`
44
+ ```ts
45
+ import { TomTomConfig } from '@tomtom-org/maps-sdk/core';
46
+ import { PlacesModule, RoutingModule, TomTomMap } from '@tomtom-org/maps-sdk/map';
47
+ import { calculateRoute, discoverPlaces } from '@tomtom-org/maps-sdk/services';
59
48
 
60
- **Services** (`@tomtom-org/maps-sdk/services`, browser + Node.js + React Native) — typed [GeoJSON](https://geojson.org/) from TomTom APIs, usable with or without a map:
49
+ TomTomConfig.instance.put({ apiKey: 'YOUR_API_KEY', language: 'en-GB' });
61
50
 
62
- - **Search** — `discoverPlaces`, `discoverOnePlace`, `getSearchSuggestions`, `getPlaceDetails`, `getPOICategories`
63
- - **Geocoding and reverse geocoding** — `geocode`, `geocodeOne`, `reverseGeocode`
64
- - **Routing** — `calculateRoute`, with up to five alternatives, turn-by-turn guidance, toll/ferry/traffic sections and vehicle restrictions
65
- - **Isochrones (reachable range)** — `calculateReachableRange`, `calculateReachableRanges`, by time, distance, fuel or electric-energy budget (private preview: the API key needs Calculate Reachable Range access)
66
- - **EV charging** — `evChargingStationsAvailability`, `getPlaceWithEVAvailability`, `getPlacesWithEVAvailability`
67
- - **Traffic** — `trafficIncidentDetails`, `trafficAreaAnalytics`
68
- - **Geometry data** — `geometryData` for administrative boundaries
69
- - **Cancellation** — `createLatestRequest` keeps only the latest of a series (search-as-you-type, refetch on map move); every call also accepts an abort signal
70
- <br/><br/>
51
+ const map = new TomTomMap({ mapLibre: { container: 'map', center: [4.9, 52.37], zoom: 12 } });
71
52
 
72
- ## 🗺️ Coming from MapLibre GL JS
53
+ const places = await PlacesModule.create(map);
54
+ await places.show(await discoverPlaces({ query: 'coffee', geoBias: { position: [4.9, 52.37] } }));
73
55
 
74
- The map **is** a MapLibre map. `TomTomMap` wraps a MapLibre `Map`, adds TomTom styles, data modules and services, and keeps the instance reachable — so MapLibre code, controls and plugins you already have keep working:
56
+ const routing = await RoutingModule.create(map);
57
+ await routing.showRoutes(await calculateRoute({ locations: [[4.9, 52.37], [5.12, 52.09]] }));
58
+ ```
75
59
 
76
- ```ts
77
- import { NavigationControl } from 'maplibre-gl';
60
+ Then follow the [Map quickstart](https://docs.tomtom.com/maps-sdk-js/guides/map/quickstart) or the [Services quickstart](https://docs.tomtom.com/maps-sdk-js/guides/services/quickstart), or start from a runnable app in the [examples gallery](https://docs.tomtom.com/maps-sdk-js/examples/).
78
61
 
79
- map.mapLibreMap.addControl(new NavigationControl(), 'top-right');
80
- map.mapLibreMap.on('moveend', () => console.log(map.mapLibreMap.getCenter()));
81
- ```
62
+ ### Requirements
82
63
 
83
- Cameras, sources, layers and style expressions stay MapLibre's. Where the SDK has a feature for the job, prefer it: it survives style switches and style upgrades, and its events coordinate across modules — for your own GeoJSON, that is `CustomGeoJSONModule`. See [About MapLibre](https://docs.tomtom.com/maps-sdk-js/guides/map/about-maplibre).
84
- <br/><br/>
64
+ - **Node.js 24+** at install time, the minimum the package declares, whether or not you target the browser.
65
+ - **A browser with WebGL** for the Map bundle.
66
+ - **A bundler** such as Vite or webpack: the SDK ships as ES modules. Under Vite, `TomTomMap` sets up MapLibre's web worker on its own; [Vite projects](https://docs.tomtom.com/maps-sdk-js/introduction/project-setup#vite-projects) says when another bundler, such as webpack, needs it set up by hand.
67
+ - **Peer dependencies**, installed by the commands above: MapLibre GL JS 6.12+, Turf 7, culori 4, Lodash 4 and Zod 4.
68
+ - **TypeScript is optional**: the type definitions ship with the package, with no `@types` package to install.
85
69
 
86
- ## 🤖 AI Coding Agent Skill
70
+ [Project setup](https://docs.tomtom.com/maps-sdk-js/introduction/project-setup) has the full requirements and the [React, Vue and Node.js](https://docs.tomtom.com/maps-sdk-js/introduction/project-setup#framework-specific-setup) setups.
87
71
 
88
- Install the SDK skill for AI coding agents (Claude Code, Cursor, GitHub Copilot, Windsurf, and [many more](https://www.npmjs.com/package/skills#available-agents)) to get SDK-specific assistance in your coding agent:
89
- ```bash
90
- npx skills add tomtom-international/maps-sdk-js --skill tomtom-maps-sdk-js
91
- ```
72
+ ## Bundles
92
73
 
93
- From 1.0 the identifier `tomtom-maps-sdk-js` is versioned like any export and changes only in a major release. [AI coding with the SDK](https://docs.tomtom.com/maps-sdk-js/guides/ai-coding) lists the topics it covers and how to invoke them.
74
+ One package, `@tomtom-org/maps-sdk`, carries three bundles:
94
75
 
95
- Other machine-readable entry points, for agents and for the people configuring them:
76
+ | Bundle | Import path | Runs in | Holds |
77
+ | --- | --- | --- | --- |
78
+ | [**Map**](https://docs.tomtom.com/maps-sdk-js/guides/map/quickstart) | `@tomtom-org/maps-sdk/map` | Browser | `TomTomMap` and its modules for places, routes, traffic and more |
79
+ | [**Services**](https://docs.tomtom.com/maps-sdk-js/guides/services/quickstart) | `@tomtom-org/maps-sdk/services` | Browser, Node.js, React Native | One function per TomTom API, most returning GeoJSON |
80
+ | [**Core**](https://docs.tomtom.com/maps-sdk-js/guides/core/quickstart) | `@tomtom-org/maps-sdk/core` | Anywhere | The shared configuration, types and utilities |
96
81
 
97
- - **Bundled `.d.ts` declarations** — the API surface an editor and an agent complete against
98
- - **[Context7 index](https://context7.com/tomtom-international/maps-sdk-js)** — this repository, indexed for agents using the Context7 MCP server
99
- - **[`examples/`](https://github.com/tomtom-international/maps-sdk-js/tree/main/examples)** — over 110 runnable apps, the best code to copy from
100
- <br/><br/>
101
- ## How it works
82
+ [How the SDK works](https://docs.tomtom.com/maps-sdk-js/guides/how-the-sdk-works) shows how the three fit together. Everything is tree-shakable: your bundle carries only the modules and services you import.
102
83
 
103
- The SDK is split into three cooperating bundles — **Map**, **Services**, and **Core**. Services call TomTom APIs and return typed [GeoJSON](https://geojson.org/) that Map modules consume directly. Core provides the shared config and types that bridge them. See [How the SDK Works](https://docs.tomtom.com/maps-sdk-js/guides/how-the-sdk-works) for a deeper dive.
84
+ ## What you can build
104
85
 
105
- ```ts
106
- import { TomTomConfig } from '@tomtom-org/maps-sdk/core';
107
- import { TomTomMap, PlacesModule, RoutingModule } from '@tomtom-org/maps-sdk/map';
108
- import { discoverPlaces, calculateRoute } from '@tomtom-org/maps-sdk/services';
86
+ ### Map
87
+
88
+ An interactive vector map in seven [TomTom styles](https://docs.tomtom.com/maps-sdk-js/guides/map/styles#built-in-styles) (`streetLight`, `streetDark`, `streetLightDriving`, `streetDarkDriving`, `monoLight`, `monoDark` and `streetSatellite`), [switching between them](https://docs.tomtom.com/maps-sdk-js/guides/map/styles#dynamic-style-switching) at runtime, in the [map language](https://docs.tomtom.com/maps-sdk-js/guides/map/styles#map-language) of your choice. [Map modules](https://docs.tomtom.com/maps-sdk-js/guides/map/modules) draw on it:
89
+
90
+ - **[Places](https://docs.tomtom.com/maps-sdk-js/guides/map/places)**: search results as markers, with [styling](https://docs.tomtom.com/maps-sdk-js/guides/map/places-styling), clustering, and [connections and entry points](https://docs.tomtom.com/maps-sdk-js/guides/map/places-connections-and-entry-points)
91
+ - **[Routes](https://docs.tomtom.com/maps-sdk-js/guides/map/routes)**: alternatives, waypoints, [route sections](https://docs.tomtom.com/maps-sdk-js/guides/map/routes-sections) for traffic, tolls and ferries, and [route styling](https://docs.tomtom.com/maps-sdk-js/guides/map/routes-styling)
92
+ - **[Geometries](https://docs.tomtom.com/maps-sdk-js/guides/map/geometries)** and **[reachable ranges](https://docs.tomtom.com/maps-sdk-js/guides/map/reachable-ranges)**: polygons, administrative boundaries and isochrones
93
+ - **[Custom GeoJSON](https://docs.tomtom.com/maps-sdk-js/guides/map/custom)**: your own data, on layers that survive style switches and take part in the map's events
94
+ - **[Traffic](https://docs.tomtom.com/maps-sdk-js/guides/map/traffic)**: [flow](https://docs.tomtom.com/maps-sdk-js/guides/map/traffic-flow), [incidents](https://docs.tomtom.com/maps-sdk-js/guides/map/traffic-incidents), [planned ones](https://docs.tomtom.com/maps-sdk-js/guides/map/traffic-incidents#planned-incidents) included, [incident details](https://docs.tomtom.com/maps-sdk-js/guides/map/traffic-incident-details) and [area analytics](https://docs.tomtom.com/maps-sdk-js/guides/map/traffic-area-analytics-module)
95
+ - **[Base map](https://docs.tomtom.com/maps-sdk-js/guides/map/base-map)** and **[POIs](https://docs.tomtom.com/maps-sdk-js/guides/map/pois)**: show or hide layer groups such as 3D buildings and road shields, and filter the base map's points of interest
96
+ - **[Terrain](https://docs.tomtom.com/maps-sdk-js/guides/map/terrain)**: hillshade relief with its own light and colours, and 3D elevation
97
+ - **[Events](https://docs.tomtom.com/maps-sdk-js/guides/map/events)**: click, hover and context-menu events on every module, and module events such as `config-change`
98
+
99
+ [Map styling](https://docs.tomtom.com/maps-sdk-js/guides/map/styling) restyles the loaded map through **semantic knobs** instead of layer ids:
109
100
 
110
- // Configure once — all services and the map use this key
111
- TomTomConfig.instance.put({ apiKey: 'YOUR_API_KEY' });
101
+ - **Every setting as data**: each module lists its settings in a knob catalogue, and `setKnob`, `getKnob` and `resetKnob` [set one by its id](https://docs.tomtom.com/maps-sdk-js/guides/map/modules#setting-a-knob-by-its-id), validated, on any module.
102
+ - **Map-wide sizes and colours**: label, icon and road sizes, and the [ten map colours and the accent](https://docs.tomtom.com/maps-sdk-js/guides/map/styling-map-colors) that routes, geometries and pins take.
103
+ - **[Presets](https://docs.tomtom.com/maps-sdk-js/guides/map/styling#presets)**: `applyMapPreset` sets a whole look in one call.
104
+ - **[Globe and sky](https://docs.tomtom.com/maps-sdk-js/guides/map/styling-globe-and-sky)**: globe projection, sky and horizon.
105
+ - **[Geopolitical views](https://docs.tomtom.com/maps-sdk-js/guides/core/geopolitical-views)**: disputed borders and territories as one country sees them, on the map and in search.
112
106
 
113
- const map = new TomTomMap({ mapLibre: { container: 'map', center: [4.9, 52.4], zoom: 12 } });
107
+ ### Services
114
108
 
115
- // Services return GeoJSON — map modules consume it directly
116
- const places = await PlacesModule.create(map);
117
- await places.show(await discoverPlaces({ query: 'coffee' }));
109
+ Typed GeoJSON from the TomTom APIs, with or without a map:
118
110
 
119
- const routing = await RoutingModule.create(map);
120
- await routing.showRoutes(await calculateRoute({ locations: [[4.9, 52.4], [13.4, 52.5]] }));
111
+ - **[Search](https://docs.tomtom.com/maps-sdk-js/guides/services/places/search)**: `discoverPlaces`, [search suggestions](https://docs.tomtom.com/maps-sdk-js/guides/services/places/suggest), [place details](https://docs.tomtom.com/maps-sdk-js/guides/services/places/place-by-id) and [POI categories](https://docs.tomtom.com/maps-sdk-js/guides/services/places/poi-categories)
112
+ - **[Geocoding](https://docs.tomtom.com/maps-sdk-js/guides/services/places/geocoding)** and **[reverse geocoding](https://docs.tomtom.com/maps-sdk-js/guides/services/places/reverse-geocoding)**: `geocode`, `geocodeOne` and `reverseGeocode`
113
+ - **[Routing](https://docs.tomtom.com/maps-sdk-js/guides/services/routing/quickstart)**: `calculateRoute`, with alternatives, [guidance](https://docs.tomtom.com/maps-sdk-js/guides/services/routing/guidance) and [vehicle restrictions](https://docs.tomtom.com/maps-sdk-js/guides/services/routing/vehicle)
114
+ - **[Reachable ranges](https://docs.tomtom.com/maps-sdk-js/guides/services/routing/reachable-ranges)**: isochrones by time or distance budget, in Private Preview
115
+ - **Traffic**: [incident details](https://docs.tomtom.com/maps-sdk-js/guides/services/traffic/traffic-incident-details) and [area analytics](https://docs.tomtom.com/maps-sdk-js/guides/services/traffic/traffic-area-analytics)
116
+ - **[Geometry data](https://docs.tomtom.com/maps-sdk-js/guides/services/places/geometry-data)**: administrative boundaries for a search result
117
+ - **[Request options and errors](https://docs.tomtom.com/maps-sdk-js/guides/services/request-options-and-errors)**: request validation, [cancellation](https://docs.tomtom.com/maps-sdk-js/guides/services/request-options-and-errors#cancelling-a-request) and deadlines, and [errors](https://docs.tomtom.com/maps-sdk-js/guides/services/request-options-and-errors#error-handling) that name what went wrong with an `SDKErrorCode`
118
+
119
+ ### Plugins
120
+
121
+ Separate packages, each declaring the SDK as a peer dependency:
122
+
123
+ | Plugin | What it does |
124
+ | --- | --- |
125
+ | [**Agent Toolkit**](https://docs.tomtom.com/maps-sdk-js/guides/plugins/agent-toolkit/overview) | Lets your users plan routes, search places and restyle the map in natural language, with the LLM and chat UI of your choice |
126
+ | [**Map Theme**](https://docs.tomtom.com/maps-sdk-js/guides/plugins/map-theme) | Themes the map from a brand's swatches, your page's CSS, a logo or a photo |
127
+ | [**Map Effects**](https://docs.tomtom.com/maps-sdk-js/guides/plugins/map-effects) | Post-processing such as bloom, depth of field, colour grading and vignette, on any style |
128
+ | [**Fly-over**](https://docs.tomtom.com/maps-sdk-js/guides/plugins/flyover) | A camera that flies along a route, framing the junctions ahead |
129
+ | [**Viewport places**](https://docs.tomtom.com/maps-sdk-js/guides/plugins/viewport-places) | Keeps search results for the visible map area on the map as it moves |
130
+ | [**Landmarks 3D**](https://docs.tomtom.com/maps-sdk-js/guides/plugins/landmarks-3d) | Detailed 3D models of recognizable buildings, in Private Preview |
131
+
132
+ ## Coming from MapLibre GL JS
133
+
134
+ The map **is** a MapLibre map. `TomTomMap` wraps a MapLibre `Map` and keeps it reachable as `map.mapLibreMap`, so the MapLibre code, controls and plugins you already have keep working:
135
+
136
+ ```ts
137
+ import { NavigationControl } from 'maplibre-gl';
138
+
139
+ map.mapLibreMap.addControl(new NavigationControl(), 'top-right');
140
+ map.mapLibreMap.on('moveend', () => console.log(map.mapLibreMap.getCenter()));
121
141
  ```
122
- <br/><br/>
123
142
 
124
- ## 📚 Documentation & Examples
143
+ Where the SDK has a feature for the job, prefer it: it survives style switches and style releases, and its events coordinate across modules. [About MapLibre](https://docs.tomtom.com/maps-sdk-js/guides/map/about-maplibre#when-to-use-tomtom-sdk-vs-direct-maplibre) says which to use when.
125
144
 
126
- - **[Live Examples](https://docs.tomtom.com/maps-sdk-js/examples/)** — try the SDK in your browser
127
- - **[Getting Started](https://docs.tomtom.com/maps-sdk-js/introduction/overview)** — introduction and project setup
128
- - **[API Reference](https://docs.tomtom.com/maps-sdk-js/api-reference/index.html)** — complete API documentation
129
- - **[Release Notes](https://docs.tomtom.com/maps-sdk-js/introduction/release-notes)** — what's new and breaking changes
130
- - **[What the SDK sends, and where](https://docs.tomtom.com/maps-sdk-js/guides/security/what-the-sdk-sends)** — the data your users' browsers send to TomTom, for your privacy notice
131
- <br/><br/>
145
+ ## Security and privacy
132
146
 
133
- ## 📦 Bundles
147
+ - [**Where your API key runs**](https://docs.tomtom.com/maps-sdk-js/guides/security/where-your-api-key-runs): a key used from the browser can be read by anyone who opens the page; a key used from Node.js cannot.
148
+ - [**Proxying your API calls**](https://docs.tomtom.com/maps-sdk-js/guides/security/proxying-api-calls): keep the key on your server by routing the SDK's requests through your own proxy, then [harden that proxy](https://docs.tomtom.com/maps-sdk-js/guides/security/hardening-your-proxy).
149
+ - [**What the SDK sends, and where**](https://docs.tomtom.com/maps-sdk-js/guides/security/what-the-sdk-sends): the data your users' browsers send to TomTom, for your privacy notice.
134
150
 
135
- | Bundle | Import path | Platforms |
136
- |--------|-------------|-----------|
137
- | **[Map](https://docs.tomtom.com/maps-sdk-js/guides/map/quickstart)** — interactive maps in [styles](https://docs.tomtom.com/maps-sdk-js/guides/map/styles), with [POIs](https://docs.tomtom.com/maps-sdk-js/guides/map/pois), [traffic](https://docs.tomtom.com/maps-sdk-js/guides/map/traffic), [places](https://docs.tomtom.com/maps-sdk-js/guides/map/places), [routes](https://docs.tomtom.com/maps-sdk-js/guides/map/routes) and [geometries](https://docs.tomtom.com/maps-sdk-js/guides/map/geometries) | `@tomtom-org/maps-sdk/map` | web |
138
- | **[Services](https://docs.tomtom.com/maps-sdk-js/guides/services/quickstart)** — [GeoJSON](https://geojson.org/) services for [places](https://docs.tomtom.com/maps-sdk-js/guides/services/places/quickstart), [routing](https://docs.tomtom.com/maps-sdk-js/guides/services/routing/quickstart), geocoding and more | `@tomtom-org/maps-sdk/services` | web, Node.js, React Native |
139
- | **[Core](https://docs.tomtom.com/maps-sdk-js/api-reference/modules/core.html)** — shared config, types and utilities; no separate install needed | `@tomtom-org/maps-sdk/core` | web, Node.js, React Native |
151
+ ## Resources for AI agents
140
152
 
141
- ## 📄 License
153
+ Besides the [coding skill](#quickstart), these entry points serve agents and the people configuring them:
142
154
 
143
- This repository uses a **dual-licensing model**.
155
+ - **Bundled `.d.ts` declarations**: the API surface an editor and an agent complete against.
156
+ - **Markdown pages**: [project setup](https://docs.tomtom.com/maps-sdk-js/introduction/project-setup.md), and the [map](https://docs.tomtom.com/maps-sdk-js/guides/map/quickstart.md), [services](https://docs.tomtom.com/maps-sdk-js/guides/services/quickstart.md) and [core](https://docs.tomtom.com/maps-sdk-js/guides/core/quickstart.md) quickstarts, published for agents to read.
157
+ - **[Context7 index](https://context7.com/tomtom-international/maps-sdk-js)**: this repository, indexed for agents using the Context7 MCP server.
158
+ - **[`examples/`](https://github.com/tomtom-international/maps-sdk-js/tree/main/examples)**: over 110 runnable apps, the best code to copy from.
144
159
 
145
- ### SDK Packages and plugins - Proprietary License
146
- The SDK packages (`@tomtom-org/maps-sdk/*` - core, services, map) and plugins (`@tomtom-org/maps-sdk-plugin-*`) are distributed under a **proprietary license**.
160
+ [AI and the SDK](https://docs.tomtom.com/maps-sdk-js/introduction/ai) covers both the coding skill and the [Agent Toolkit](https://docs.tomtom.com/maps-sdk-js/guides/plugins/agent-toolkit/overview), for putting an LLM in front of your users.
147
161
 
148
- 📜 **[LICENSE.txt](./LICENSE.txt)** - Full license terms
162
+ ## Documentation
149
163
 
150
- These packages require a TomTom API key and agreement to our terms of service.
164
+ - [**Introduction**](https://docs.tomtom.com/maps-sdk-js/introduction/overview) and [**project setup**](https://docs.tomtom.com/maps-sdk-js/introduction/project-setup)
165
+ - [**Guides**](https://docs.tomtom.com/maps-sdk-js/guides/how-the-sdk-works), starting with how the SDK works
166
+ - [**Examples**](https://docs.tomtom.com/maps-sdk-js/examples/), live in your browser with their code
167
+ - [**API reference**](https://docs.tomtom.com/maps-sdk-js/api-reference/index.html), every exported symbol with its signature and types
168
+ - [**Release notes**](https://docs.tomtom.com/maps-sdk-js/introduction/release-notes) and the [changelog](./CHANGELOG.md)
169
+ - [**Migrating from V6**](https://docs.tomtom.com/maps-sdk-js/guides/migration/v6-to-new-sdk), for apps on the TomTom Maps SDK for Web V6
151
170
 
152
- ### Examples - Apache V2.0 License
153
- All example code in the `examples/` directory is **open-source** under the Apache V2.0 License.
171
+ ## License
154
172
 
155
- 📜 **[examples/LICENSE](./examples/LICENSE)** - Apache V2.0 License
173
+ This repository uses a **dual-licensing model**:
156
174
 
157
- The examples can be freely copied, modified, and used in your projects.
175
+ - **SDK packages and plugins**: `@tomtom-org/maps-sdk` (core, services, map) and the `@tomtom-org/maps-sdk-plugin-*` packages are distributed under a **proprietary license**, in [LICENSE.txt](./LICENSE.txt). They require a TomTom API key and agreement to our terms of service.
176
+ - **Examples**: the code in `examples/` is **open source** under the Apache 2.0 license, in [examples/LICENSE](./examples/LICENSE). Copy, modify and use it in your projects.
158
177
 
159
- ### Source-Available Repository
160
- This repository is source-available for transparency and learning. This is a read-only mirror - see [CONTRIBUTING.md](./CONTRIBUTING.md) for how to provide feedback through issues and discussions.
178
+ The [GitHub repository](https://github.com/tomtom-international/maps-sdk-js) carries the examples, the changelogs and the AI coding skill; the SDK's sources are not published. It is a read-only mirror: report bugs in its [issues](https://github.com/tomtom-international/maps-sdk-js/issues) and ask questions in its [discussions](https://github.com/tomtom-international/maps-sdk-js/discussions).
package/THIRD_PARTY.txt CHANGED
@@ -152,7 +152,7 @@ terms above.
152
152
  ---
153
153
 
154
154
  Name: maplibre-gl
155
- Version: 6.11.2
155
+ Version: 6.12.0
156
156
  License: BSD-3-Clause
157
157
  Bundled: false (peer dependency)
158
158
  Required by: map