@tomtom-org/maps-sdk 1.0.0-rc.1 → 1.0.0-rc.3

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,278 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0-rc.3
4
+
5
+ ### Minor Changes
6
+
7
+ - [#2674](https://github.com/tomtom-internal/maps-sdk-js/pull/2674) [`61026c0`](https://github.com/tomtom-internal/maps-sdk-js/commit/61026c0adaa35986bc0a9d11a3cdb4b342acb9d6) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - **Breaking:** core: ten plain POI sub-categories have codes of their own, such as `SCHOOL_GENERIC`, so a search can ask for plain schools without childcare or driving schools
8
+
9
+ - **Breaking:** core: a place in one of them reads as its own code rather than its parent's. Where you match `SCHOOL`, `THEATER`, `SPORTS_CENTER`, `MARINA`, `WEIGH_STATION`, `OPEN_CAR_PARKING_AREA`, `COLLEGE_OR_UNIVERSITY`, `CAR_WASH`, `AMUSEMENT_PARK` or `TRAFFIC_CONTROL_DEPARTMENT` in `poi.categories`, match its `_GENERIC` code too
10
+ - **Breaking:** core: a `Record<POICategory, …>` needs an entry for each of the ten codes
11
+ - services: a `poiCategoryQuery` or `resolvePOICategories` word that names a plain sub-category best, such as `'rto'` or `'open car parking area'`, resolves to its `_GENERIC` code, which searches that sub-category alone rather than its parent and the parent's other sub-categories
12
+ - services: a word no longer spends one of its three codes on a sub-category of another code it already has, so `'medical'` and `'care'` also find `EMERGENCY_MEDICAL_SERVICE`
13
+ - map: a place with one of the new codes takes its parent's base-map icon, pin and `categoryIcons` entry
14
+
15
+ - [#2659](https://github.com/tomtom-internal/maps-sdk-js/pull/2659) [`a580975`](https://github.com/tomtom-internal/maps-sdk-js/commit/a5809754b51feb9a1583cd23d149364e17727bb9) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - **Breaking:** map: a route's border crossings stand in a bubble above the route, the summary bubble's shape with its tail on the border, instead of a plaque on the route line; `countryCrossings.alignment` is removed with its knob and the `CountryCrossingAlignment` type, and crossings no longer carry a `bearing`
16
+
17
+ - The default bubble takes the selected summary bubble's default colours, so it follows the light or dark style, `setMapColors()` and the `colors.label` and `colors.labelHalo` knobs: white on a light style, dark grey on a dark one, the map's label halo lightened under a theme. `countryCrossings.color` and `countryCrossings.label.color` still override either.
18
+ - A crossing hides where a waypoint pin, a summary bubble, another symbol drawn above it or a crossing close by would cover it, and shows again once there's room.
19
+ - Migration: drop `alignment` from `countryCrossings`. A bubble stays level with the screen.
20
+ - examples: `route-sections-playground` drops its crossing alignment control and gains a map look picker, light, dark and an amber theme, that the crossings follow.
21
+
22
+ - [#2659](https://github.com/tomtom-internal/maps-sdk-js/pull/2659) [`a580975`](https://github.com/tomtom-internal/maps-sdk-js/commit/a5809754b51feb9a1583cd23d149364e17727bb9) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - services: an instruction's `pathPointIndex` is the route point at its maneuver, rather than the first point a few metres short of it, so it usually falls inside the `lanes` section leading to the maneuver
23
+
24
+ - **Breaking:** a `lanes` section's `properties` read `IS_MANEUVER`, as documented, where they passed the API's `isManeuver` through. Match `'IS_MANEUVER'` instead.
25
+
26
+ - [#2686](https://github.com/tomtom-internal/maps-sdk-js/pull/2686) [`5c52f46`](https://github.com/tomtom-internal/maps-sdk-js/commit/5c52f4619177d4776e32a167e871578ef4f4a2bf) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - **Breaking:** map: the types of place events, traffic features and waypoint ids match what the map hands your code
27
+
28
+ - **Breaking:** map: under `pin-clustered`, a cluster no longer reaches the `events.places` handlers, which are typed `Place`, nor takes their hover and click states. The module-wide `events` receive it, with `cluster: true`, `cluster_id` and `point_count` in its properties
29
+ - **Breaking:** map: `roadSubcategory` is optional on `TrafficIncidentsModuleFeature`, and absent off `street` and `service` roads, as on `TrafficFlowModuleFeature`
30
+ - **Breaking:** map: a `TrafficFlowModuleFeature`'s geometry is a `LineString` or a `MultiLineString`, so check `geometry.type` before you read its coordinates
31
+ - **Breaking:** map: a waypoint keeps the id you give it, a number included, so `WaypointDisplayProps.id` is `string | number`
32
+
33
+ - [#2650](https://github.com/tomtom-internal/maps-sdk-js/pull/2650) [`3ce0603`](https://github.com/tomtom-internal/maps-sdk-js/commit/3ce0603daadfa044b4797a25db21278f1c267302) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - **Breaking:** core: `getDistinctSections` finds the stretches each route has to itself, and `calculateRoute` returns them as `sections.distinct` whenever it returns two or more routes. `getImportantRoads` names the main roads a route takes, by road number
34
+
35
+ - **Breaking:** core: `SectionType` and `sectionTypes` include `'distinct'`, which a request's `sectionTypes` can't ask for: the SDK adds it. A `Record<SectionType, …>` needs an entry for it
36
+ - **Breaking:** services: `InputSectionType` is only the types a request can ask for, so `leg` and `distinct` no longer compile in `sectionTypes`; type a list as `InputSectionTypes` rather than `SectionType[]`. `InputSectionTypes` is read-only, so build a list whole rather than `push` onto one. `inputSectionTypes`, `inputSectionTypesWithGuidance` and `sectionTypes` are read-only lists of their exact types
37
+ - core: each distinct section runs from where its route leaves the others to where it rejoins them, with its `lengthInMeters`, and `minLengthInMeters` leaves out the short ones
38
+ - core: `getSectionOverlap` gives the stretch two sections of one route share, whatever their types, as a `RouteSpan`
39
+ - core: `getSectionsWithin` lists a route's sections of every type within spans of it, such as the ferries, tolls and traffic on its distinct sections, with each section's share there to prorate a jam's delay
40
+ - core: `compareRoutes` tells what a route adds and avoids against a reference route, such as the selected alternative, or the route `costModel: { traffic: 'historical' }` gives, to say which jams and closures the live route avoids
41
+ - core: `getImportantRoads` groups a route's `importantRoadStretch` sections road by road, each with its `name`, its length and its stretches to ring with `setSectionFocus`; `within: sections.distinct` names what sets a route apart
42
+ - map: summary bubbles sit on their route's longest distinct section, read from `sections.distinct` when every route carries it, so a route crossing another at a junction keeps its whole stretch for the bubble
43
+ - examples: the `route-with-alternatives` and `react-route-planner` examples name the main roads of the stretches each route has to itself, and highlight a route the same way from the map or its card
44
+ - examples: each card in `route-with-alternatives` says what its route adds and avoids against the selected route, or against the usual route a toggle draws: ferries, car trains, tolls, closures, roadworks, traffic and unpaved roads
45
+
46
+ - [#2675](https://github.com/tomtom-internal/maps-sdk-js/pull/2675) [`d1471c3`](https://github.com/tomtom-internal/maps-sdk-js/commit/d1471c3f69ed7a865e3e6b044632bd04c92271be) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - **Breaking:** map: a route you select with a click takes the selected style alone, and a feature an `events.where()` predicate rejects stays inert, so narrowing a click to the alternatives keeps the selected route from reacting to the pointer
47
+
48
+ - **Breaking:** map: an `events.where()` predicate decides on the top-most feature under the pointer. One it rejects keeps the map cursor and takes no hover or click highlight, and the handler doesn't run, even with a matching feature beneath
49
+ - map: `selectRoute` clears the `click` state of the route lines and summary bubbles, so a route you select with a click no longer stays highlighted
50
+ - map: a long hover comes on the feature under the pointer when it comes due, so a still pointer no longer long-hovers a route as it was before a click selected it, which drew its wider outline
51
+ - examples: `route-summary-bubbles-playground` selects only alternatives on click
52
+
53
+ - [#2688](https://github.com/tomtom-internal/maps-sdk-js/pull/2688) [`af7a24e`](https://github.com/tomtom-internal/maps-sdk-js/commit/af7a24e336bcd2062fa102e78e3614787f5888d5) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - services: **Breaking:** the service types say what each call returns and takes, from reverse geocoding and geometry data to the errors, and a call can set its own `retry`
54
+ - services: **Breaking:** `reverseGeocode` resolves a `ReverseGeocodingResponse`, a `Place` or, where nothing matches, the queried point without `properties`; checking `properties` narrows it to a `Place`
55
+ - services: **Breaking:** `geometryData` given a `Places` collection types each polygon's properties as `PlaceGeometryProps`, its place's properties plus `placeCoordinates`, and gives a polygon that matches no place `null` properties; a `Place[]` or geometry IDs return plain `PolygonFeatures`
56
+ - services: a service call's `retry` overrides the global one field by field, and `retry: undefined` turns retrying off for that call
57
+ - services: **Breaking:** a service call no longer takes `displayUnits`, which no service reads
58
+ - services: **Breaking:** `calculateReachableRanges` rejects a `404`, a `5xx` or an error without a status, as it does a `401`, `403` or `429`, and skips only the other `4xx`, such as the `400` `MAP_MATCHING_FAILURE` of an origin off the road network
59
+ - services: **Breaking:** `SDKError.service` is a `ServiceName`, the union of the services' names, and reachable ranges report `'ReachableRange'`, not `'Reachable Range'`
60
+ - services: **Breaking:** the wire-format types `PoiCategoriesResponseAPI`, `PoiCategoryAPI`, `PlaceDetailsResponseAPI` and `PlaceDetailsResultAPI` are no longer exported
61
+ - services: **Breaking:** `minFuzzyLevel` and `maxFuzzyLevel` take a `FuzzyLevel`, the whole numbers `1` to `4`
62
+ - core: **Breaking:** a route traffic section's `tec` is optional, and absent when the service sends no TEC codes
63
+
64
+ ### Patch Changes
65
+
66
+ - [#2680](https://github.com/tomtom-internal/maps-sdk-js/pull/2680) [`46ecb86`](https://github.com/tomtom-internal/maps-sdk-js/commit/46ecb861d06cbfbc9cc952f098ae31d68528c6c3) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - core: `languages` is a runtime export, and the distance formatter, bounding-box and route helpers handle their edge cases
67
+
68
+ - core: `formatDistance` rounds below 10 m to one decimal, rounds a negative distance to the same magnitude as its positive, rounds feet and yards once rather than twice, and takes `undefined`
69
+ - core: `bboxCenter` centres a box that crosses the antimeridian, and `bboxFromGeoJSON` reads the 2D edges of a 3D `bbox`
70
+ - core: `getProgressAtNearestRoutePoint` returns `undefined` on a route under two coordinates, rather than throwing
71
+ - core: `getCoordinateAtRouteProgress` returns `undefined` past an end whose progress entry lacks the value, rather than `0`
72
+ - core: `findBestWaypointInsertionIndices` and `withInsertedWaypoints` prepend on a route under two coordinates
73
+ - core: `getRouteProgressForSection` and `getSectionBBox` take any `RouteSpan`, such as the one `getSectionOverlap` returns
74
+ - core: `TomTomConfig.instance.reset()` restores the retry defaults, even after a caller edited `get().retry`
75
+
76
+ - [#2659](https://github.com/tomtom-internal/maps-sdk-js/pull/2659) [`a580975`](https://github.com/tomtom-internal/maps-sdk-js/commit/a5809754b51feb9a1583cd23d149364e17727bb9) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - core: `getInstructionLanes(route, instruction)` finds the `lanes` section leading to an instruction's maneuver, so a directions panel can show the lanes to take under each step
77
+
78
+ - examples: `route-with-guidance` lists its instructions in a Directions panel, and both it and `react-route-planner` draw the lanes to take under each instruction that has them, as a small SVG sign of their own.
79
+
80
+ - [#2687](https://github.com/tomtom-internal/maps-sdk-js/pull/2687) [`7ff2c57`](https://github.com/tomtom-internal/maps-sdk-js/commit/7ff2c5703f66f90c521d192a65a622ad439562f2) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: images without a DOM, base-map places under offset POI icons and a module's `events.off()` handle their edge cases
81
+
82
+ - map: a module given an SVG image where there is no DOM, as in a server render or a Node.js test, adds no image rather than throwing a `TypeError`
83
+ - map: a `base-map` place keeps the style's icon offset when `POIsModule` offsets its own `categoryIcons` entry for the same category, rather than drawing its sprite that many pixels away
84
+ - map: `events.off('shown-features')` stops compiling on a module with no `show` method, which never emits that event, as `events.on('shown-features', …)` already did
85
+
86
+ - [#2695](https://github.com/tomtom-internal/maps-sdk-js/pull/2695) [`7f4c439`](https://github.com/tomtom-internal/maps-sdk-js/commit/7f4c4393b880abcb828f719f9b099d87f40f24a0) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: geometries and reachable ranges can blend `fill.palette` from its first colour to its last, fade the bands away from the origin, and dash or dot their borders
87
+
88
+ - map: `fill.paletteMode: 'ramp'` shades the features, or the bands, evenly from the palette's first colour to its last, blended in OKLCH. `'cycle'`, the default, takes the colours in turn as before
89
+ - map: `ReachableRangesModule`'s `fill.outermostOpacityFactor` multiplies the outermost band's fill opacity, and steps the bands between evenly from the innermost one. A lone range takes the factor
90
+ - map: `line.pattern` (`'solid'`, `'dashed'` or `'dotted'`) breaks up the borders of `GeometriesModule` and `ReachableRangesModule`, scaled with the border width
91
+ - map: the new settings are knobs of `geometriesKnobCatalogue` and `reachableRangesKnobCatalogue`
92
+ - map: `LinePattern` now types every line pattern; `SectionLinePattern` is deprecated in its favour
93
+ - examples: `geometry-config-playground` sets the border pattern, `multiple-geometries` swaps palettes and switches them between cycling and ramping, and `reachable-ranges-playground` offers two- and five-colour palettes to ramp
94
+
95
+ - [#2698](https://github.com/tomtom-internal/maps-sdk-js/pull/2698) [`b7be724`](https://github.com/tomtom-internal/maps-sdk-js/commit/b7be7243dcf5df5897ea6ef3053eb382588a72e6) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: light the 3D buildings with the `view.light` knobs of `StylingFoundationsModule`, kept across style switches
96
+
97
+ - `view.light.direction`, `view.light.altitude`, `view.light.alignment`, `view.light.color` and `view.light.intensity` set MapLibre's light. A part you leave unset takes the style's own light, otherwise MapLibre's default
98
+ - `stylingFoundationsKnobKinds` gains `number`, the kind of the direction, altitude and intensity
99
+ - `exportStyle()` carries the light the knobs set
100
+ - Once a light knob has been set, a clean `setStyle(…, { resetState: true })` draws the new style's light, rather than keeping the one the knobs had set
101
+ - examples: `map-styling-playground` shows the light knobs in a View light section
102
+
103
+ - [#2658](https://github.com/tomtom-internal/maps-sdk-js/pull/2658) [`80d6897`](https://github.com/tomtom-internal/maps-sdk-js/commit/80d68974f433320a332b59dea66c0904a0118349) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: road shields, POI icons and road patterns no longer go missing when the map's own sprite loads more slowly than the place pins' sprite
104
+
105
+ - [#2685](https://github.com/tomtom-internal/maps-sdk-js/pull/2685) [`9825c67`](https://github.com/tomtom-internal/maps-sdk-js/commit/9825c67233d1175c668fff544c92c916bf474297) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: modules keep their state across style switches, routes draw with a traffic halo, and events, images and knobs handle their edge cases
106
+
107
+ - map: `RoutingModule` draws its routes when `sections.traffic.style` is `'halo'`, at creation, after a style switch and when switched at runtime
108
+ - map: `routeIndex` on route sections, summary bubbles and border crossings is the route's position among the shown routes, so `selectRoute` and clicks work when only some routes are shown
109
+ - map: `selectRoute` waits for the module before reading the shown routes, so a `showRoutes` it follows unawaited keeps its routes; a new `showRoutes` starts its summary bubbles with no click state
110
+ - map: route jam labels follow `displayUnits.time`, and a speed limit that changes at a border takes the country the route enters
111
+ - map: speed-limit signs anchor to their own instance's layers, and go to the top on a style without their usual anchor
112
+ - map: `PlacesModule` restores what it showed synchronously on a style switch, repaints its default pin when created with no config, and no longer fires `shown-features` for the restore
113
+ - map: a place category icon with no image resolves to the sprite's own id, a `poiCategory` icon mapping draws the `categoryIcons` entry for the category it returns, and `layers.*.layout` overrides win over the computed text and icon offsets
114
+ - map: `POIsModule` keeps its category icons after a `setStyle` to the style already loaded, and `FOOD_DRINKS_GROUP`, `HEALTH_GROUP` and `ENTERTAINMENT_GROUP` no longer pull in delicatessens, welfare organisations and clubs
115
+ - map: a centre title keeps its own hover and click state rather than its polygon's, and two identical reachable ranges no longer shade the inverted style
116
+ - map: raw layer edits stay on top of every module's knobs, a preset switch fires `config-change` once per module, and an unknown preset id such as `'toString'` throws the documented error
117
+ - map: event handlers survive a style switch that leaves their scope with no layers, hover detects a feature with id 0 and the same id in two sources, and a handler that unsubscribes mid-dispatch no longer skips the next one
118
+ - map: a slow image load no longer overwrites a newer image or re-adds a removed one, and `addOrUpdateImage` leaves a caller's `onload` alone
119
+ - map: a `setStyle` called before the first style load finishes on the style it asked for, or on the first style when its own fails to load
120
+ - map: `TrafficAreaAnalyticsModule` moves its hover outlines and highlights with their cells on a `beforeLayerConfig` change, and its heatmap stays valid when every tile has the same value
121
+ - map: an incident with an average speed of 0 km/h keeps it, and the jam delay label rounds to whole minutes first, with a marker sized for the rounded label
122
+ - map: `CustomGeoJSONModule` gives a feature with no id one no other feature holds, keeps a layer hidden that its spec sets to `visibility: 'none'`, re-adds an image whose options change, and no longer fires `shown-features` on a style switch
123
+ - map: a retry after the first style fails to load loads it, and a `setGeopoliticalView` or `setLanguage` called mid-switch applies once the map is ready without undoing a later call
124
+ - map: a display-units change keeps the hover and click states of route jams and speed-limit signs, `showWaypoints` draws with a config applied while it waited, a waypoint Feature with `properties: null` no longer throws, and speed-limit signs show mph in Jersey, Guernsey, the Isle of Man, the US territories, seven British Overseas Territories, eight Caribbean states and Samoa
125
+ - map: a dotted ferry or tunnel line draws its dots, and a named routing layer override placed under another routing layer, by its bare name or its full id, lands there rather than on top
126
+ - map: `PlacesModule` keeps entry point and connection event states across a style switch, a cluster rebuild and a config change, and a custom icon's label offset accounts for its `pixelRatio` and an SVG's drawn size, an SVG with only a width or a height taking the other from its viewBox
127
+ - map: `POIsModule` no longer turns on micro markers the style hides, `styling.layers` visibility edits no longer show a layer a module hides, a style sky that draws nothing no longer hides the theme sky while one with colours but no atmosphere counts as shown, and base-map group knobs apply in the order given
128
+ - map: an events scope you hold registers on the current sources after a style switch, clicking the empty map clears a click state set before one, an `on()` unsubscribe removes only its own registration, and a hovered place redrawn as selected doesn't fire `hover` twice
129
+ - map: a layer added in the same config change follows the layer it is pinned under when that layer moves
130
+ - map: geometries with their own ids keep them, and their event states, after a config change
131
+ - map: area analytics cells stop at `maxMeters`, their hover outlines and highlights follow the metric filter, and an empty `colorStops` falls back to the palette; `TrafficIncidentDetailsModule.show()` keeps the layers its `layers` config hides; an incident delay or report count of 0 is kept
132
+ - map: `calculateFittingBBox` clamps latitudes to the Web Mercator range and handles a box across the antimeridian, and `calculatePaddedBBox` covers a rotated map and cuts a panel touching one edge from its closest edge
133
+ - map: a module's `applyConfig` and `resetConfig` reach the event handlers already registered, so a new hover cursor or grace period applies, and a click on a cluster whose id matches a shown feature's hands the handler the cluster
134
+ - map: `TrafficFlowModule`, `TrafficIncidentsModule` and `TerrainModule` show and hide their layers alongside `styling.layers` edits, so an edit no longer shows traffic or a hillshade the module hides, and `BaseMapModule` no longer misrecords an `all-except` visibility for a layer group the style has no layers for
135
+ - map: a section's halo no longer vanishes under the route outline when the section sets a narrower `widthFactor` or `widthPreset`, and setting `countryCrossings.visible: true` while they are shown keeps a clicked crossing's state
136
+ - map: a `setStyle` call a newer one supersedes resolves even when its style fails to load, as documented
137
+ - map: area analytics extrusion highlights follow an extrusion height that ramps with zoom
138
+ - map: `POIsModuleSerializableConfig` is exported, and `stylingFoundationsKnobIds` is `readonly` like the other modules' knob id lists, so code that mutates it stops compiling
139
+ - map: `PlaceLayerName` leaves out `'additional'`, which names no layer, and `RouteLayersConfig.sections` names only the layers each type draws: `speedLimit` its sign layer, the other generated types their line and icon layers
140
+ - map: `PlacesModule.updateData` and a show after a config change drop the category, icon and extra properties the previous config added, and a custom module's layers that reference each other stack in dependency order at creation, on `applyConfig` and after a style switch
141
+ - map: `CustomGeoJSONLayerSpec` takes only the six layer types a GeoJSON source draws (circle, line, fill, fill-extrusion, symbol and heatmap)
142
+ - map: a route module with only some `displayUnits` of its own follows a global unit-system change for the rest
143
+ - map: a POIs event handler no longer receives base-map features, nor a base-map handler POI ones, and a `recently-hovered` state clears after its handler unsubscribes
144
+ - map: area analytics fall back to the defaults for each fill and line field left `undefined`, an inverted display cuts every region out of the mask, and `setHeight(undefined)` clears the extrusion height
145
+ - map: a jam with a delay of 0 shows no "1 min" marker, and a whole-hour jam delay gets the small sprite
146
+ - map: `setLayout` takes `visibility` as `'visible'` or `'none'` only, since a visibility expression was drawn as always visible, and `getStyleInput()` is typed as never `undefined`
147
+ - map: routes relabel on the next config change after a global display-units change, a style switch in between included, and a layer override's `reset()` after a style switch restores the new style's value, or after a `setStyle` to the style already loaded the value it replaced
148
+ - map: an `off()` followed by a style switch no longer leaves a hover, click or recently-hovered state stuck on a source
149
+ - map: a place config change gives back the place's own value of a property an `extraFeatureProps` entry replaced, and a clicked `micro` dot under `pin-clustered` keeps its state across a config change and a style switch
150
+ - map: `CustomGeoJSONModule.applyConfig` throws a clear error before changing anything when the config names other sources or `sourceID`s than the module was created with, where it used to apply half of it
151
+ - map: area analytics hover and click highlights stay off the cells a layer filter hides
152
+
153
+ - [#2692](https://github.com/tomtom-internal/maps-sdk-js/pull/2692) [`cbc4dc9`](https://github.com/tomtom-internal/maps-sdk-js/commit/cbc4dc9857d306db1eca93d1e9d5a23b1f901141) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - core, services, map: the package now installs on Node.js 22 with any package manager
154
+
155
+ - The `engines` field asks for Node.js 22 or newer instead of 24, and no longer names a pnpm version, so npm and pnpm stop warning about it on Node.js 22 and `engine-strict` installs succeed
156
+
157
+ - [#2676](https://github.com/tomtom-internal/maps-sdk-js/pull/2676) [`383a6c6`](https://github.com/tomtom-internal/maps-sdk-js/commit/383a6c6e62ce6a183bc1a062a7fa88be5fd7278f) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: Fade a route, the traffic overlays, the incidents you show and your place icons, each with one opacity setting
158
+
159
+ - `RoutingModule` `opacity` fades the route lines and their outlines, selected and deselected; sections keep `sections.<type>.opacity`
160
+ - `TrafficFlowModule` and `TrafficIncidentsModule` `opacityFactor` multiply the style's own line opacity, its zoom ramp kept; the incident icons stay opaque
161
+ - `TrafficIncidentDetailsModule` `line.opacity` fades the incident lines; the markers and the highlight outline stay opaque
162
+ - `PlacesModule` `icon.opacity` fades the icons of every marker type, the cluster pin included; a selected place stays opaque
163
+ - Each is a knob in its module's catalogue
164
+ - `route-styling-playground` fades the route through `opacity`, `places-customize-playground` gains an icon opacity slider, and `traffic-incident-focus` fades the flow through `opacityFactor`
165
+
166
+ - [#2681](https://github.com/tomtom-internal/maps-sdk-js/pull/2681) [`97c0508`](https://github.com/tomtom-internal/maps-sdk-js/commit/97c050866cb312ca1c4e3cfa22c8cbc4d116fd46) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - services: `calculateReachableRange` rejects an arrival time with a message that shows the `when` shape to use instead, `when: { option: 'departAt', date }`
167
+
168
+ - [#2642](https://github.com/tomtom-internal/maps-sdk-js/pull/2642) [`1d75842`](https://github.com/tomtom-internal/maps-sdk-js/commit/1d75842ba862bf87648eb33beef02d64df7db366) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: Choose what a route's summary bubble says, its colour, typeface and the zooms it shows at, or write your own text per route
169
+
170
+ - `summaryBubbles.fields` lists `duration`, `distance` and `trafficDelay` in the order shown; a bubble with nothing to say isn't drawn, so `['trafficDelay']` shows bubbles on delayed routes alone
171
+ - `summaryBubbles.minZoom`, `maxZoom`, `color` and `label` (`color`, `size`, `opacity`, `typeface`, `customTypeface`) are knobs in `routingKnobCatalogue`, all but `customTypeface`
172
+ - `summaryBubbles.label.title` takes a function of the route's summary, or a MapLibre expression, and writes its text in place of the fields
173
+ - The bubbles now follow the map: a theme's `labelHalo` and `label` colours once one sets them, else dark bubbles and light text on a dark style
174
+ - New `route-summary-bubbles-playground` example, its panel built from the catalogue
175
+
176
+ - [#2643](https://github.com/tomtom-internal/maps-sdk-js/pull/2643) [`507e4e5`](https://github.com/tomtom-internal/maps-sdk-js/commit/507e4e52902adbd216ecc9cd8d45c60e7b7b02fd) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: Summary bubbles keep clear of each other, show on the routes you choose and give each alternative's time against the selected route
177
+
178
+ - Each bubble sits on a stretch of road its route has to itself, so routes sharing a motorway no longer hide each other's bubble, and it stays put when another route is selected
179
+ - `summaryBubbles.routes` shows the bubbles on `all` routes, the `selected` one alone or its `alternatives`
180
+ - The `durationDifference` field writes each other route's time against the selected one, such as `+6 min`, and `selectRoute` re-times the bubbles
181
+ - The `route-summary-bubbles-playground` example opens with bubbles timed against the selected route
182
+
183
+ - [#2684](https://github.com/tomtom-internal/maps-sdk-js/pull/2684) [`eb4da3f`](https://github.com/tomtom-internal/maps-sdk-js/commit/eb4da3f3cad8af1ddc9c4e9d926736fd4a104ab1) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - services: validation catches the inputs that used to crash or reach the API, and routing, search suggestions and the shared pipeline handle their edge cases
184
+
185
+ - services: validation rejects, as `INVALID_REQUEST`, what used to throw a plain `Error` or come back as a 400: an empty Polygon or a Point in `geometrySearch`, an impossible date such as `'2024-02-30'` in `trafficAreaAnalytics`, more than 100 incident ids, a non-integer fuzzy level or a `minFuzzyLevel` above `maxFuzzyLevel`, a routing avoid area with no bounding box, a one-point path, a non-integer `maxAlternatives`, an along-route search route under two positions, a zero reachable-range budget, a non-integer or out-of-range `limit` or `heading`, and an undefined `commonBaseURL`
186
+ - services: validation also rejects an empty array as a route location, a stop's `candidateEntryPoints` off the globe or `preferredEntryPointIndex` past them, an empty `geometrySearch` geometry list or ring, `days` beside an `endDate` in `trafficAreaAnalytics`, and a bare bbox of other than four numbers; it now accepts a GeometryCollection where a bounding box is read, bare or inside a Feature or FeatureCollection, and the documented `weightKG: 0`
187
+ - services: validation checks GeoJSON input against its type: a route waypoint's position, every position of a path, an along-route search route or a polygon ring, and a `geometrySearch` Circle centre must be on the globe, a bounding box can't be an empty array or collection, a path given as a Feature must hold a LineString, a stop's `pauseDurationSeconds` can't be negative and its `legCostModel` takes only known route types and avoid values, a geometry's coordinates must match its `type`, and a GeoJSON `bbox` must hold 4 or 6 numbers; `extendedPostalCodesFor`, `mapcodes`, `openingHours`, `timeZone`, `relatedPois` and `filters.indexes` reject values outside their types
188
+ - services: a validation error from a union schema lists what each branch rejected
189
+ - services: `onAPIResponse` receives the API's response body, as its type says, rather than the fetch envelope, and fires once per call
190
+ - services: proxy-credentials mode is decided per call, so a call with its own `apiKey` no longer sends `credentials: 'include'` under a global proxy setup
191
+ - services: an error response labelled JSON whose body doesn't parse still rejects with its status
192
+ - services: `calculateRoute` keeps the leg point indices right after a one-coordinate first leg, gives a road-shield section with no references `[]`, no longer lets an origin's `candidateEntryPoints` override `useEntryPoints`, maps TEC cause codes 16, 22 and 23 to `'other'` as the TPEG2-TEC table defines them, and gives each instruction with no road info an object of its own
193
+ - services: `trafficAreaAnalytics` no longer throws a `RangeError` over a region with hundreds of thousands of tiles, and `calculateReachableRanges` stops listening to the batch's abort signal once each call settles
194
+ - services: `getSearchSuggestions` shows a brand asked for alongside address-type kinds
195
+ - services: `getSearchSuggestions` no longer offers a category refinement whose `refine()` fails for a category id the SDK doesn't know, and leaves out autocomplete segments of a type the SDK doesn't know
196
+ - services: `getPOICategories` and `resolvePOICategories` validate their parameters and reject with `SDKAbortError` on an aborted signal even when the cache or the known codes answer the call
197
+ - services: `SDKServiceError.status` is `readonly`, like the other error fields
198
+ - services: `geocode` keeps in `geographyType` only the types core's `geographyTypes` lists, and rejects `extendedPostalCodesFor: ['POI']` as `INVALID_REQUEST`
199
+ - services: a blank `poiCategoryQuery` rejects rather than searching with no category filter
200
+ - services: `calculateReachableRanges` no longer needs `AbortSignal.any`, which React Native lacks, and the search cursor no longer needs `atob` and `btoa`
201
+ - services: a search or geocode result at distance 0 keeps its `distance`, Kosovo's `XK` maps to `XKX`, and `getPOICategories` hands out a copy of its cache
202
+ - services: `VehicleModel` and `VehicleDimensions` are exported
203
+ - core: `TomTomConfig.instance.put` drops `undefined` retry fields rather than storing them over the defaults
204
+
205
+ - [#2690](https://github.com/tomtom-internal/maps-sdk-js/pull/2690) [`e56d293`](https://github.com/tomtom-internal/maps-sdk-js/commit/e56d293fdc713cd7301713ac16bdc1ff581910d4) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - core, services, map: an app now bundles only the SDK code its imports use, so most single imports come out far smaller
206
+
207
+ - core: importing one helper, such as `generateId`, bundles under 1 KB minified instead of about 30 KB with lodash
208
+ - services: `geocode` bundles about 14 KB minified instead of 68 KB, and `calculateRoute` 32 KB instead of 86 KB, with lodash
209
+ - map: `TomTomMap` bundles about 44 KB minified on top of MapLibre instead of 123 KB, with lodash
210
+ - core, services, map: the package declares `sideEffects: false`, so bundlers drop the modules an app doesn't import
211
+
212
+ - [#2700](https://github.com/tomtom-internal/maps-sdk-js/pull/2700) [`f0d3922`](https://github.com/tomtom-internal/maps-sdk-js/commit/f0d392242f16d86eaf4aa0fd7f1b44888295e8ee) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: a route's speed limit signs draw from zoom 12.5 by default instead of 11, two and a half zooms after the tunnel and closed-road signs, so they no longer crowd the overview of a route; `sections.speedLimit.sign.minZoom` still sets it, in steps of half a zoom in `routingKnobCatalogue`
213
+
214
+ - examples: `route-speed-signs` sets `sign.minZoom` to 10, so its tiles post the signs on a whole route; `route-sections-playground` moves its `sign.minZoom` slider by half a zoom
215
+
216
+ ## 1.0.0-rc.2
217
+
218
+ ### Minor Changes
219
+
220
+ - [#2548](https://github.com/tomtom-internal/maps-sdk-js/pull/2548) [`89660b0`](https://github.com/tomtom-internal/maps-sdk-js/commit/89660b065154b0211cb7234fa5d2da6f74ba9086) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - **Breaking:** map: a knob id is the path of its setting in the configuration on every module, and `setKnobs` sets several knobs in one checked change
221
+ - map: `setKnobs(module, catalogue, values)` checks every value against its knob, then applies them all in one change and one `config-change`. If it refuses one value, it sets none. `KnobValues<CONFIG, ID>` types the values by id
222
+ - map: `StylingFoundationsModuleConfig` nests each setting along its id, as every other module does: `{ labels: { sizeFactor: 1.2 } }` instead of `{ 'labels.sizeFactor': 1.2 }`. `setKnob`, `setKnobs`, `getKnob`, `resetKnob` and `MapPresetSettings` keep the ids
223
+ - map: `StylingFoundationsModule`'s `updateConfig` merges one level deep, as on every module, so `updateConfig({ colors: { water } })` replaces the colours set before. Set a single colour with `setKnob`. Its `applyConfig` and `updateConfig` no longer check values at run time, as on every module. `setKnob` and `setKnobs` do
224
+ - map: a `KnobTarget` implements `_setKnobValues(values)` instead of `_setKnobValue(id, value)`, and a subclass of `AbstractMapModule` inherits it. For a plugin's own target, `knobValueIn`, `configWithKnobs` and `configWithoutKnob` implement the hooks
225
+ - map-effects: `MapEffectsSettings` is `MapEffectsConfig`, and nests each knob along its id: `new MapEffects(map, { bloom: { intensity: 0.5 } })`. `updateConfig` replaces each effect it names, while `setKnob` and `setKnobs` keep the rest of an effect. The constructor, `applyConfig` and `updateConfig` no longer check values at run time, as on a map module. `setKnob` and `setKnobs` do. The plugin needs SDK 1.0.0-rc.2
226
+ - agent-toolkit: `setMapStyling` reads the styling knobs at their paths, and the plugin needs SDK 1.0.0-rc.2
227
+ - examples: the map effects playground restores its panel from `localStorage` with `setKnobs`
228
+
229
+ ### Patch Changes
230
+
231
+ - [#2601](https://github.com/tomtom-internal/maps-sdk-js/pull/2601) [`cd9d3d2`](https://github.com/tomtom-internal/maps-sdk-js/commit/cd9d3d27e910f434ef9df78c3b5f8cdde567fb07) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: `TrafficAreaAnalyticsModule` metric filters no longer make MapLibre validate the whole style on each change
232
+
233
+ - [#2603](https://github.com/tomtom-internal/maps-sdk-js/pull/2603) [`fadf352`](https://github.com/tomtom-internal/maps-sdk-js/commit/fadf35214f0667c6bd229ca3f49223a136d66d56) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: a traffic flow section at a standstill reports `absoluteSpeed: 0` from `TrafficFlowModule.getRenderedFeatures()` and its events, instead of leaving it `undefined`
234
+
235
+ - [#2590](https://github.com/tomtom-internal/maps-sdk-js/pull/2590) [`75fb3ea`](https://github.com/tomtom-internal/maps-sdk-js/commit/75fb3eab4d38b2aad8f4f671c3fd84f78ffc19f3) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - license: the privacy clause of `LICENSE.txt` now links the TomTom Privacy Policy, https://www.tomtom.com/privacy/
236
+
237
+ - [#2547](https://github.com/tomtom-internal/maps-sdk-js/pull/2547) [`447d663`](https://github.com/tomtom-internal/maps-sdk-js/commit/447d6634aecd22002e0c3f206c80917fe53cf047) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: The map fills its container from the first frame on pages whose scrollbars take up layout space, as on Windows
238
+ - If the page didn't import the MapLibre CSS, the canvas could stay about one scrollbar width short on the right and bottom until the window was resized
239
+
240
+ - [#2535](https://github.com/tomtom-internal/maps-sdk-js/pull/2535) [`51a1d85`](https://github.com/tomtom-internal/maps-sdk-js/commit/51a1d85d07a7578031e8fb95c3d627d0205e120a) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: a knob or config change on a data-owned module writes only the layer properties whose value changes, so a value set on its layers with `mapLibreMap` stays until a change sets that property
241
+ - map: changing a `GeometriesModule`'s `line.color` keeps a fill opacity or label size set on its layers, and the same holds for routes, places, reachable ranges, custom GeoJSON, traffic incident details and area analytics
242
+
243
+ - [#2630](https://github.com/tomtom-internal/maps-sdk-js/pull/2630) [`5f5c5dd`](https://github.com/tomtom-internal/maps-sdk-js/commit/5f5c5dd44f4cd8076d1cda3960198d41732707fa) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: Set every label on the map in one typeface, from the style's serif and italic faces or your own font files, and give the labels of a route, places or geometries one of their own
244
+
245
+ - The `labels.typeface` knob of `StylingFoundationsModule` takes `sans`, `sans-italic`, `serif` or `serif-italic` (`mapTypefaces`), each label keeping its weight
246
+ - `labels.customTypeface` takes your own font file URLs per weight (`CustomTypeface`), which the map downloads itself; characters outside their range are drawn in the style's Noto face
247
+ - The labels of routes, places, geometries, reachable ranges and incident details follow the map's typeface unless their module sets its own
248
+ - Each module's label settings take the same `typeface` (a knob: `label.typeface`, `waypoints.label.typeface`, `lineLabel.typeface`) and `customTypeface`, for those labels alone
249
+ - The waypoint, geometry and reachable-range `font` knobs have no default, so `getKnob` returns `undefined` until you set one. Unset, those labels are in `Noto-Bold` set in their typeface
250
+ - `exportStyle()` returns labels set in font files in the style's own Noto faces, since only the SDK can draw those files
251
+ - New `map-typeface` example, with ten open-source font families and a typeface each for the map, the waypoints, the museums and a district
252
+ - `map-styling-playground` shows the typefaces in its Labels section, beside a route, museums and a district, and its sections now collapse
253
+ - `themed-map` sets its labels in Fraunces from the first frame
254
+
255
+ - [#2325](https://github.com/tomtom-internal/maps-sdk-js/pull/2325) [`31a9dd7`](https://github.com/tomtom-internal/maps-sdk-js/commit/31a9dd7cd78edd0100a58ef736196054199880d5) Thanks [@carlosprietofernandez-tomtom](https://github.com/carlosprietofernandez-tomtom)! - map: `RoutingModule`, `PlacesModule`, `CustomGeoJSONModule` and `TrafficIncidentDetailsModule` keep their events and `sourceAndLayerIDs` in step with the layers a later config change adds or removes
256
+ - A removed layer, such as a section icon, an `additional` layer, a custom source's layer or the incident highlight halo, used to stop hover and click for every module on the map. An added layer got no events and was missing from `sourceAndLayerIDs`
257
+
258
+ - [#2600](https://github.com/tomtom-internal/maps-sdk-js/pull/2600) [`fb14661`](https://github.com/tomtom-internal/maps-sdk-js/commit/fb146619ed8a8e7449dc74fff0d6e40f33c2839a) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: `POIsModule`'s `filters.categories` narrows the micro markers too, so the dots of filtered-out categories no longer show from zoom 15.5, nor come back from `getRenderedFeatures()`
259
+
260
+ - [#2635](https://github.com/tomtom-internal/maps-sdk-js/pull/2635) [`cf929d0`](https://github.com/tomtom-internal/maps-sdk-js/commit/cf929d0020f0a595105b809a8af64c702f3e6f57) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: `RoutingModule.setSectionFocus` rings any section or leg of the shown routes, so your UI can point at the stretch it describes
261
+
262
+ - The ring outlines the route clear of its hovered outline and section halos rather than covering them, black on a light style and white on a dark one, as the traffic incident highlight does
263
+ - `highlight.section.outline.color` and `highlight.section.outline.widthFactor` restyle it, as config or as routing knobs
264
+ - `getShown().sectionFocus` holds the focused sections, and `showRoutes` clears them
265
+ - examples: `route-leg-options-playground` rings the leg you point at or focus in its panel
266
+ - examples: `route-styling-playground` rings the route's toll roads, with a colour and a width control for the ring
267
+
268
+ - [#2627](https://github.com/tomtom-internal/maps-sdk-js/pull/2627) [`e09550e`](https://github.com/tomtom-internal/maps-sdk-js/commit/e09550ebbd9a46d464bb186fb4ec220cafc55170) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: the `maplibre-gl` peer dependency moves up to `^6.13.0`
269
+
270
+ - [#2625](https://github.com/tomtom-internal/maps-sdk-js/pull/2625) [`a1fe38b`](https://github.com/tomtom-internal/maps-sdk-js/commit/a1fe38b520341e70efc22900aa17ce5edeb7f9cb) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: a route's speed limit signs draw from zoom 11 by default, one zoom after the tunnel and closed-road signs, so they no longer crowd the overview of a route; `sections.speedLimit.sign.minZoom` still sets it
271
+
272
+ - [#2528](https://github.com/tomtom-internal/maps-sdk-js/pull/2528) [`fe64ed1`](https://github.com/tomtom-internal/maps-sdk-js/commit/fe64ed17caba48f9e95316981e89865c51d021c0) Thanks [@DanielForniessoria-TomTom](https://github.com/DanielForniessoria-TomTom)! - map: a `TerrainModule` change that leaves the 3D surface as it was, such as a hillshade knob, no longer makes MapLibre rebuild the terrain
273
+
274
+ - [#2614](https://github.com/tomtom-internal/maps-sdk-js/pull/2614) [`fe596fc`](https://github.com/tomtom-internal/maps-sdk-js/commit/fe596fcb2d1c5a05dddb77547f48debc1b856a12) Thanks [@JulianChinAFoeng-TomTom](https://github.com/JulianChinAFoeng-TomTom)! - tests: each package's unit test run now fails when its coverage drops below the goals in `TESTING.md`
275
+
3
276
  ## 1.0.0-rc.1
4
277
 
5
278
  ### Patch Changes
package/LICENSE.txt CHANGED
@@ -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, 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.
17
+ 3.2. Except as permitted by applicable law or this Clause 3.2, you may not copy (except for backup purposes), modify, adapt, distribute, rent, lend, publicly present, decompile, reverse engineer, disassemble or create derivative works of the SDK. Solely for your Permitted Applications and subject to Clauses 3.3 to 3.5, you may: (a) inspect the SDK, including source code in its source maps, for debugging; (b) copy the SDK as reasonably necessary to develop, build, test and deploy them, including in internal repositories, mirrors and offline build environments used only by you, your Affiliates and your contractors; (c) modify the SDK to fix errors or security vulnerabilities, to maintain compatibility, or to prepare a Contribution under Clause 11.5, but you may not alter, circumvent or disable any functionality for authentication, metering, billing, the notices in Clause 5.2 or the data collection in Clause 4; and (d) distribute the SDK only as a bundled part of a Permitted Application, and not on a standalone basis or as a library. Modified versions remain part of the SDK, and TomTom need not support them. On termination, you must delete all copies held under (b), except copies already distributed under (d). The readability of the SDK's source code does not make it open source and grants no rights beyond those 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
 
@@ -22,7 +22,7 @@ You may not use the SDK or accept this Agreement if you are barred from receivin
22
22
 
23
23
  3.5. The SDK may include data or software that TomTom licenses from third parties, including open-source software. Such components are made available to you under the terms and conditions of their applicable licenses, and you shall comply with all requirements and restrictions that those third parties may require TomTom to impose on you (as may be updated and amended by TomTom from time to time). It is your responsibility to check, review and comply with those terms as they apply to the SDK licensed to you under this Agreement. The applicable third party and open-source notices are set out in the accompanying THIRD_PARTY.txt file. In the event of a conflict between this Agreement and an open-source license governing a specific dependency, that open-source license shall prevail solely with respect to that dependency.
24
24
 
25
- 4. PRIVACY: In order to improve the TomTom Developer Portal and the SDK, TomTom may collect certain usage related information from the software, including but not limited to general SDK and product identifiers, version numbers, and information on which tools and/or services in the SDK are used and how you use them. In addition, TomTom may collect your unique identifier and associated IP address for legitimate business reasons (such as, without limitation, the processing of invoices). This data is retained for a maximum period of 120 days and is maintained in accordance with our Privacy Policy.
25
+ 4. PRIVACY: In order to improve the TomTom Developer Portal and the SDK, TomTom may collect certain usage related information from the software, including but not limited to general SDK and product identifiers, version numbers, and information on which tools and/or services in the SDK are used and how you use them. In addition, TomTom may collect your unique identifier and associated IP address for legitimate business reasons (such as, without limitation, the processing of invoices). This data is retained for a maximum period of 120 days and is maintained in accordance with our Privacy Policy (https://www.tomtom.com/privacy/).
26
26
 
27
27
  5. INTELLECTUAL PROPERTY RIGHTS AND COPYRIGHT NOTICES:
28
28
 
package/README.md CHANGED
@@ -5,7 +5,8 @@
5
5
  [**Examples**](https://docs.tomtom.com/maps-sdk-js/examples/) |
6
6
  [**Documentation**](https://docs.tomtom.com/maps-sdk-js/introduction/overview) |
7
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)
8
+ [**Release notes**](https://docs.tomtom.com/maps-sdk-js/introduction/release-notes) |
9
+ [**Earlier versions**](https://tomtom-international.github.io/maps-sdk-js/)
9
10
 
10
11
  [![NPM Version](https://img.shields.io/npm/v/@tomtom-org/maps-sdk.svg)](https://www.npmjs.com/package/@tomtom-org/maps-sdk)
11
12
 
@@ -13,7 +14,7 @@
13
14
 
14
15
  **Maps SDK for JavaScript** is a **JavaScript/TypeScript** library for building applications with **TomTom** maps and location APIs.
15
16
 
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
+ It's 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
18
 
18
19
  > 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.
19
20
 
@@ -34,10 +35,10 @@ It is built on [MapLibre GL JS](https://docs.tomtom.com/maps-sdk-js/guides/map/a
34
35
  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):
35
36
 
36
37
  ```bash
37
- npx skills add tomtom-international/maps-sdk-js --skill tomtom-maps-sdk-js
38
+ npx skills add tomtom-international/maps-sdk-js --skill tomtom-maps-sdk-js tomtom-maps-sdk-js-feedback
38
39
  ```
39
40
 
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.
41
+ 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. The optional `tomtom-maps-sdk-js-feedback` skill lets the agent report SDK problems it hits to TomTom, with your consent. [AI coding with the SDK](https://docs.tomtom.com/maps-sdk-js/guides/ai-coding) lists the topics it covers, how to invoke them and [what a report holds](https://docs.tomtom.com/maps-sdk-js/guides/ai-coding#reporting-sdk-problems).
41
42
 
42
43
  4. **Start building.** Services return GeoJSON, and map modules show it unchanged:
43
44
 
@@ -59,12 +60,14 @@ It is built on [MapLibre GL JS](https://docs.tomtom.com/maps-sdk-js/guides/map/a
59
60
 
60
61
  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/).
61
62
 
63
+ <!-- The public repository's README opens with everything above this line: keep this line verbatim, and every link above it valid there. -->
64
+
62
65
  ### Requirements
63
66
 
64
- - **Node.js 24+** at install time, the minimum the package declares, whether or not you target the browser.
67
+ - **Node.js 22+** at install time, the minimum the package declares, whether or not you target the browser. Any package manager works: npm, pnpm or Yarn.
65
68
  - **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.
69
+ - **A bundler** such as Vite or webpack, because 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.
70
+ - **Peer dependencies**, installed by the commands above: MapLibre GL JS 6.13+, Turf 7, culori 4, Lodash 4 and Zod 4.
68
71
  - **TypeScript is optional**: the type definitions ship with the package, with no `@types` package to install.
69
72
 
70
73
  [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.
@@ -140,11 +143,11 @@ map.mapLibreMap.addControl(new NavigationControl(), 'top-right');
140
143
  map.mapLibreMap.on('moveend', () => console.log(map.mapLibreMap.getCenter()));
141
144
  ```
142
145
 
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.
146
+ 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.
144
147
 
145
148
  ## Security and privacy
146
149
 
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.
150
+ - [**Where your API key runs**](https://docs.tomtom.com/maps-sdk-js/guides/security/where-your-api-key-runs): anyone who opens the page can read a key used from the browser, but not one used from Node.js.
148
151
  - [**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
152
  - [**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.
150
153
 
@@ -175,4 +178,4 @@ This repository uses a **dual-licensing model**:
175
178
  - **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
179
  - **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.
177
180
 
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).
181
+ The [GitHub repository](https://github.com/tomtom-international/maps-sdk-js) carries the examples, the changelogs and the AI coding skills. The SDK's sources aren't published. It's a read-only mirror, so 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.12.0
155
+ Version: 6.13.0
156
156
  License: BSD-3-Clause
157
157
  Bundled: false (peer dependency)
158
158
  Required by: map