@tomtom-org/maps-sdk 0.29.2 → 0.30.1

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,25 @@
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.1](https://github.com/tomtom-internal/maps-sdk-js/compare/v0.30.0...v0.30.1) (2025-11-05)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * pin category mapping ([a6aecb8](https://github.com/tomtom-internal/maps-sdk-js/commit/a6aecb8569e3865d32ca814684f1c8c8d1f3b3e0))
11
+
12
+ ## [0.30.0](https://github.com/tomtom-internal/maps-sdk-js/compare/v0.29.2...v0.30.0) (2025-11-05)
13
+
14
+
15
+ ### Features
16
+
17
+ * enable tomtom user agent headers by default ([30bcc22](https://github.com/tomtom-internal/maps-sdk-js/commit/30bcc2264e5cd335c19b8f01699bc20de1141947))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * route example content ([4b56065](https://github.com/tomtom-internal/maps-sdk-js/commit/4b56065916e512a7d3ea2d2af00e02fbc17b1c77))
23
+
5
24
  ## [0.29.2](https://github.com/tomtom-internal/maps-sdk-js/compare/v0.29.1...v0.29.2) (2025-11-04)
6
25
 
7
26
 
package/README.md CHANGED
@@ -1,26 +1,33 @@
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
- [**Documentation**](https://docs.tomtom.com/maps-sdk-js/introduction/overview) |
6
+ [**Documentation**](https://docs.tomtom.com/maps-sdk-js/introduction/overview)
7
7
 
8
8
  [![NPM Version](https://img.shields.io/npm/v/@tomtom-org/maps-sdk.svg)](https://www.npmjs.com/package/@tomtom-org/maps-sdk)
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.
16
16
  <br/><br/>
17
17
 
18
+ ## ⚠️ Public Preview Notice
19
+ 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.
20
+ While our goal is to keep the design of the interface stable, breaking changes may occur.
21
+ We will do our utmost to communicate these breaking changes in advance, whenever possible.
22
+ <br/><br/>
23
+
18
24
  ## 🚀 Getting Started using npm
19
25
  ```
20
26
  npm i @tomtom-org/maps-sdk
21
27
  ```
22
28
  Additionally:
23
29
  * If you use the map: ```npm i maplibre-gl```
30
+ <br/><br/>
24
31
 
25
32
  ## 📚 Documentation & Examples
26
33
 
@@ -32,16 +39,14 @@ Explore comprehensive guides and interactive examples to get the most out of Map
32
39
  ### 📖 Documentation
33
40
  - **[Getting Started Guide](https://docs.tomtom.com/maps-sdk-js/introduction/overview)** - Introduction and key features
34
41
  - **[Project Setup](https://docs.tomtom.com/maps-sdk-js/introduction/project-setup)** - Step-by-step setup instructions
35
- - **[Map Guides](https://docs.tomtom.com/maps-sdk-js/guides/map/)** - Display and configure interactive maps
36
- - **[Services Guides](https://docs.tomtom.com/maps-sdk-js/guides/services/)** - Search, routing, and geocoding
37
- - **[Core Utilities](https://docs.tomtom.com/maps-sdk-js/guides/core/)** - Common configurations and utilities
42
+ - **[How the SDK Works](https://docs.tomtom.com/maps-sdk-js/guides/how-the-sdk-works)** - Architecture and concepts
38
43
 
39
44
  ### 📋 API Reference
40
45
  - **[API Reference](https://docs.tomtom.com/maps-sdk-js/reference/overview)** - Complete API documentation
41
46
 
42
47
  ### 📝 Latest Updates
43
48
  - **[Release Notes](https://docs.tomtom.com/maps-sdk-js/overview/release-notes)** - What's new and breaking changes
44
- <br/><br/><br/>
49
+ <br/><br/>
45
50
 
46
51
  ## 🌍 Where can you run it on?
47
52
  * **web**: display and configure a map, search for places, plan routes, and easily display and interact with them, including your own data
@@ -50,52 +55,16 @@ Explore comprehensive guides and interactive examples to get the most out of Map
50
55
  <br/><br/>
51
56
 
52
57
  ## 📦 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
58
  * [Map](#map): MapLibre-powered library for readily styled, service-compatible and interactive TomTom Maps
91
- * * [MapLibre](https://maplibre.org/maplibre-gl-js/docs/) is an open source peer dependency so your application can also use it directly
59
+ * [MapLibre](https://maplibre.org/maplibre-gl-js/docs/) is an open source peer dependency so your application can also use it directly
92
60
  * [Services](#services): Functions with GeoJSON services for TomTom location APIs
93
- * * Compatible with web, nodejs and React Native applications
61
+ * Compatible with web, nodejs and React Native applications
94
62
  * [Core](#core): shared configuration, types and utilities
95
- * * Facilitates seamless integration between map and services
63
+ * Facilitates seamless integration between map and services
64
+ <br/><br/>
96
65
 
97
66
  ## 🗺️ Map
98
- The SDK [Map bundle](https://developer-staging.tomtom.com/maps-sdk-js/api-reference/home#map-modules) is built on top of [MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/), and shares it as a dependency with your app.\
67
+ The SDK [Map bundle](https://docs.tomtom.com/maps-sdk-js/guides/map/quickstart) is built on top of [MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/), and shares it as a dependency with your app.\
99
68
  You can both use the TomTom and MapLibre SDKs together at any time.
100
69
 
101
70
  ### ✨ Feature highlights
@@ -117,7 +86,7 @@ Code imports from the SDK Map Bundle will come from ```@tomtom-org/maps-sdk/map`
117
86
  <br/><br/>
118
87
 
119
88
  ## 🔧 Services
120
- The SDK [Services bundle](https://developer-staging.tomtom.com/maps-sdk-js/api-reference/home#service-modules) integrates the TomTom location APIs into comprehensive [GeoJSON](https://geojson.org/) services.\
89
+ The SDK [Services bundle](https://docs.tomtom.com/maps-sdk-js/guides/services/quickstart) integrates the TomTom location APIs into comprehensive [GeoJSON](https://geojson.org/) services.\
121
90
  The services can be integrated in **web**, [nodejs](https://nodejs.org/) and [React Native](https://reactnative.dev/) apps.\
122
91
  The compatibility of both inputs and outputs with [GeoJSON](https://geojson.org/) helps with further integration with geospatial tools.
123
92
 
@@ -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.1"}`,
280
277
  // TODO: restore if we implement oauth2 access
281
278
  // optional oauth2 access token:
282
279
  // ...(params.apiAccessToken && { Authorization: `Bearer ${params.apiAccessToken}` }),