@tomtom-org/maps-sdk 0.29.2 → 0.30.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
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [0.30.0](https://github.com/tomtom-internal/maps-sdk-js/compare/v0.29.2...v0.30.0) (2025-11-05)
6
+
7
+
8
+ ### Features
9
+
10
+ * enable tomtom user agent headers by default ([30bcc22](https://github.com/tomtom-internal/maps-sdk-js/commit/30bcc2264e5cd335c19b8f01699bc20de1141947))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * route example content ([4b56065](https://github.com/tomtom-internal/maps-sdk-js/commit/4b56065916e512a7d3ea2d2af00e02fbc17b1c77))
16
+
5
17
  ## [0.29.2](https://github.com/tomtom-internal/maps-sdk-js/compare/v0.29.1...v0.29.2) (2025-11-04)
6
18
 
7
19
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- [![TomTom Logo](./tomtom-logo-big.svg)](https://www.tomtom.com/)
1
+ [//]: # ([![TomTom Logo](./tomtom-logo-big.svg)](https://www.tomtom.com/))
2
2
 
3
- # Maps SDK for JavaScript
3
+ # TomTom Maps SDK for JavaScript
4
4
 
5
5
  [**Examples**](https://docs.tomtom.com/maps-sdk-js/examples/) |
6
6
  [**Documentation**](https://docs.tomtom.com/maps-sdk-js/introduction/overview) |
@@ -9,7 +9,7 @@
9
9
 
10
10
  TomTom Maps SDK for JavaScript is a **JavaScript** library for building applications using [**TomTom** location maps and services](https://docs.tomtom.com/).
11
11
 
12
- [![SDK Example Thumbnails](./sdk-examples-collage.png)](https://docs.tomtom.com/maps-sdk-js/examples/)
12
+ [//]: # ([![SDK Example Thumbnails](./sdk-examples-collage.png)](https://docs.tomtom.com/maps-sdk-js/examples/))
13
13
 
14
14
  It leverages the power of [MapLibre GL JS](https://github.com/maplibre/maplibre-gl-js) and [GeoJSON](https://geojson.org/)
15
15
  to seamlessly integrate TomTom maps and services with convenient out-of-the-box support, while staying highly customizable and extensible.
@@ -50,43 +50,6 @@ Explore comprehensive guides and interactive examples to get the most out of Map
50
50
  <br/><br/>
51
51
 
52
52
  ## 📦 Bundles
53
- ```mermaid
54
- flowchart TD
55
- App["Your application"]
56
- MapLibre["MapLibre GL JS"]
57
- subgraph SDK["SDK"]
58
- direction TB
59
- Map["Map"]
60
- Services["Services"]
61
- Core["Core"]
62
- end
63
-
64
- App --> Map
65
- App --> MapLibre
66
- App --> Services
67
- App --> Core
68
-
69
- Map -.-> Core
70
- Map -.-> MapLibre
71
-
72
- Services -.-> Core
73
-
74
- classDef mapClass fill:#fffde7,stroke:#ff6f00,color:#ff6f00;
75
- classDef servicesClass fill:#f3e5f5,stroke:#4a148c,color:#4a148c;
76
- classDef coreClass fill:#e8f5e9,stroke:#1b5e20,color:#1b5e20;
77
- classDef maplibreClass fill:#295DAA,stroke:#295DAA,color:white;
78
-
79
- class Map mapClass;
80
- class Services servicesClass;
81
- class Core coreClass;
82
- class MapLibre maplibreClass;
83
-
84
- click Map "##_Map" "Go to Map section"
85
- click Services "#services" "Go to Services section"
86
- click Core "#core" "Go to Core section"
87
- click MapLibre "https://maplibre.org/maplibre-gl-js/docs/" "Go to MapLibre GL JS documentation"
88
- ```
89
-
90
53
  * [Map](#map): MapLibre-powered library for readily styled, service-compatible and interactive TomTom Maps
91
54
  * * [MapLibre](https://maplibre.org/maplibre-gl-js/docs/) is an open source peer dependency so your application can also use it directly
92
55
  * [Services](#services): Functions with GeoJSON services for TomTom location APIs
@@ -263,8 +263,7 @@ const bboxFromGeoJSON = (hasBBox) => {
263
263
  const bboxExpandedWithGeoJSON = (geoJson, bboxToExpand) => bboxExpandedWithBBox(bboxFromGeoJSON(geoJson), bboxToExpand);
264
264
  const bboxCenter = (bbox) => [(bbox[0] + bbox[2]) / 2, (bbox[1] + bbox[3]) / 2];
265
265
  const generateId = () => Date.now().toString(36) + Math.random().toString(36).substring(2);
266
- const TOMTOM_USER_AGENT_SDK_NAME = "TomTomSDKsMapsJS";
267
- const SDK_VERSION = "__SDK_VERSION__";
266
+ const TOMTOM_USER_AGENT_SDK_NAME = "MapsSDKJS";
268
267
  const validateTrackingId = (trackingId) => {
269
268
  if (!/^[a-zA-Z0-9-]{1,100}$/.test(trackingId)) {
270
269
  throw new TypeError(
@@ -274,9 +273,7 @@ const validateTrackingId = (trackingId) => {
274
273
  return trackingId;
275
274
  };
276
275
  const generateTomTomHeaders = (params) => ({
277
- ...params.tomtomUserAgent && {
278
- "TomTom-User-Agent": `${TOMTOM_USER_AGENT_SDK_NAME}/${SDK_VERSION}`
279
- },
276
+ "TomTom-User-Agent": `${TOMTOM_USER_AGENT_SDK_NAME}/${"0.30.0"}`,
280
277
  // TODO: restore if we implement oauth2 access
281
278
  // optional oauth2 access token:
282
279
  // ...(params.apiAccessToken && { Authorization: `Bearer ${params.apiAccessToken}` }),