@tomtom-org/maps-sdk 0.41.1 → 0.41.5
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 +43 -0
- package/README.md +6 -6
- package/core/dist/THIRD_PARTY.txt +1 -1
- package/core/dist/core.es.js +1 -1
- package/core/dist/core.es.js.map +1 -1
- package/core/package.json +0 -3
- package/map/dist/THIRD_PARTY.txt +5 -5
- package/map/dist/index.d.ts +156 -10
- package/map/dist/map.es.js +1 -1
- package/map/dist/map.es.js.map +1 -1
- package/map/package.json +2 -4
- package/package.json +7 -5
- package/services/dist/THIRD_PARTY.txt +2 -2
- package/services/dist/services.es.js +1 -1
- package/services/dist/services.es.js.map +1 -1
- package/services/package.json +1 -4
package/core/package.json
CHANGED
|
@@ -31,9 +31,6 @@
|
|
|
31
31
|
"@types/lodash-es": "catalog:",
|
|
32
32
|
"@vitest/coverage-v8": "catalog:",
|
|
33
33
|
"rimraf": "catalog:",
|
|
34
|
-
"rollup-plugin-analyzer": "catalog:",
|
|
35
|
-
"rollup-plugin-license": "catalog:",
|
|
36
|
-
"rollup-plugin-visualizer": "catalog:",
|
|
37
34
|
"shared-configs": "workspace:*",
|
|
38
35
|
"ts-node": "catalog:",
|
|
39
36
|
"typescript": "catalog:",
|
package/map/dist/THIRD_PARTY.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Name: lodash-es
|
|
2
|
-
Version: 4.17.
|
|
2
|
+
Version: 4.17.23
|
|
3
3
|
License: MIT
|
|
4
4
|
Private: false
|
|
5
5
|
Description: Lodash exported as ES modules.
|
|
@@ -63,7 +63,7 @@ terms above.
|
|
|
63
63
|
---
|
|
64
64
|
|
|
65
65
|
Name: @turf/helpers
|
|
66
|
-
Version: 7.3.
|
|
66
|
+
Version: 7.3.3
|
|
67
67
|
License: MIT
|
|
68
68
|
Private: false
|
|
69
69
|
Description: Provides helper functions to create GeoJSON features, like points, lines, or areas on a map.
|
|
@@ -102,7 +102,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
102
102
|
---
|
|
103
103
|
|
|
104
104
|
Name: @turf/invariant
|
|
105
|
-
Version: 7.3.
|
|
105
|
+
Version: 7.3.3
|
|
106
106
|
License: MIT
|
|
107
107
|
Private: false
|
|
108
108
|
Description: Lightweight utility for input validation and data extraction in Turf.js. Ensures GeoJSON inputs are in the correct format and extracts specific components like coordinates or geometries.
|
|
@@ -139,7 +139,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
139
139
|
---
|
|
140
140
|
|
|
141
141
|
Name: @turf/bearing
|
|
142
|
-
Version: 7.3.
|
|
142
|
+
Version: 7.3.3
|
|
143
143
|
License: MIT
|
|
144
144
|
Private: false
|
|
145
145
|
Description: Takes two points and finds the geographic bearing between them.
|
|
@@ -173,7 +173,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
173
173
|
---
|
|
174
174
|
|
|
175
175
|
Name: maplibre-gl
|
|
176
|
-
Version: 5.
|
|
176
|
+
Version: 5.17.0
|
|
177
177
|
License: BSD-3-Clause
|
|
178
178
|
Private: false
|
|
179
179
|
Description: BSD licensed community fork of mapbox-gl, a WebGL interactive maps library
|
package/map/dist/index.d.ts
CHANGED
|
@@ -351,6 +351,12 @@ export declare class AddedSourceWithLayers<SOURCE_SPEC extends SourceSpecificati
|
|
|
351
351
|
ensureAddedToMapWithVisibility(visible: boolean, addLayersToMap: boolean): void;
|
|
352
352
|
}
|
|
353
353
|
|
|
354
|
+
/**
|
|
355
|
+
* Availability level for POI icons with availability indicators.
|
|
356
|
+
* @group Shared
|
|
357
|
+
*/
|
|
358
|
+
export declare type AvailabilityLevel = 'available' | 'occupied';
|
|
359
|
+
|
|
354
360
|
/**
|
|
355
361
|
* Source identifier for base map vector tiles.
|
|
356
362
|
*
|
|
@@ -1364,7 +1370,7 @@ export declare type CustomImage<I extends string = string> = {
|
|
|
1364
1370
|
* The specific values depend on the context:
|
|
1365
1371
|
* - For POI categories: Use MapStylePOICategory values (e.g., 'RESTAURANT', 'HOTEL_MOTEL')
|
|
1366
1372
|
* - For route waypoints: Use waypoint identifiers (e.g., 'waypoint-start', 'waypoint-end')
|
|
1367
|
-
* - For charging stations: Use station type identifiers
|
|
1373
|
+
* - For charging stations: Use station type identifiers (e.g., 'ELECTRIC_VEHICLE_STATION')
|
|
1368
1374
|
* - For custom markers: Use any unique string identifier
|
|
1369
1375
|
*/
|
|
1370
1376
|
id: I;
|
|
@@ -1415,6 +1421,36 @@ export declare type CustomImage<I extends string = string> = {
|
|
|
1415
1421
|
* ```
|
|
1416
1422
|
*/
|
|
1417
1423
|
pixelRatio?: number;
|
|
1424
|
+
/**
|
|
1425
|
+
* Availability level for POI icons with availability indicators.
|
|
1426
|
+
*
|
|
1427
|
+
* @remarks
|
|
1428
|
+
* Used when displaying custom icons for POIs with real-time availability data.
|
|
1429
|
+
* The SDK will select the appropriate icon based on the availability ratio and
|
|
1430
|
+
* configured threshold.
|
|
1431
|
+
*
|
|
1432
|
+
* - `'available'`: Used when ratio >= threshold (sufficient capacity available)
|
|
1433
|
+
* - `'occupied'`: Used when ratio < threshold (low or no availability)
|
|
1434
|
+
*
|
|
1435
|
+
*
|
|
1436
|
+
* @example
|
|
1437
|
+
* ```typescript
|
|
1438
|
+
* // Define custom icons for both availability states
|
|
1439
|
+
* categoryIcons: [
|
|
1440
|
+
* {
|
|
1441
|
+
* id: 'ELECTRIC_VEHICLE_STATION',
|
|
1442
|
+
* image: greenChargingSVG,
|
|
1443
|
+
* availabilityLevel: 'available'
|
|
1444
|
+
* },
|
|
1445
|
+
* {
|
|
1446
|
+
* id: 'ELECTRIC_VEHICLE_STATION',
|
|
1447
|
+
* image: redChargingSVG,
|
|
1448
|
+
* availabilityLevel: 'occupied'
|
|
1449
|
+
* }
|
|
1450
|
+
* ]
|
|
1451
|
+
* ```
|
|
1452
|
+
*/
|
|
1453
|
+
availabilityLevel?: AvailabilityLevel;
|
|
1418
1454
|
};
|
|
1419
1455
|
|
|
1420
1456
|
/**
|
|
@@ -2013,6 +2049,81 @@ declare type DisplayTrafficSectionProps = DisplaySectionProps & TrafficSectionPr
|
|
|
2013
2049
|
title?: string;
|
|
2014
2050
|
};
|
|
2015
2051
|
|
|
2052
|
+
/**
|
|
2053
|
+
* Configuration for EV charging station availability display.
|
|
2054
|
+
*
|
|
2055
|
+
* @remarks
|
|
2056
|
+
* **Opt-In Feature:**
|
|
2057
|
+
* - Disabled by default - set `enabled: true` to activate
|
|
2058
|
+
* - Requires fetching availability via {@link getPlacesWithEVAvailability}
|
|
2059
|
+
* - Each PlacesModule can enable/disable independently
|
|
2060
|
+
*
|
|
2061
|
+
* When enabled, displays formatted availability text (e.g., "3/10") below the station name
|
|
2062
|
+
* with color-coding based on availability ratio: green (high), orange (limited), red (none/low).
|
|
2063
|
+
*
|
|
2064
|
+
* @example
|
|
2065
|
+
* ```typescript
|
|
2066
|
+
* // Enable with defaults
|
|
2067
|
+
* const places = await PlacesModule.get(map, {
|
|
2068
|
+
* evAvailability: { enabled: true }
|
|
2069
|
+
* });
|
|
2070
|
+
* const stations = await search({ poiCategories: ['ELECTRIC_VEHICLE_STATION'] });
|
|
2071
|
+
* places.show(await getPlacesWithEVAvailability(stations));
|
|
2072
|
+
*
|
|
2073
|
+
* // Custom threshold and format
|
|
2074
|
+
* const places = await PlacesModule.get(map, {
|
|
2075
|
+
* evAvailability: {
|
|
2076
|
+
* enabled: true,
|
|
2077
|
+
* threshold: 0.5,
|
|
2078
|
+
* formatText: (available, total) => `${available} of ${total}`
|
|
2079
|
+
* }
|
|
2080
|
+
* });
|
|
2081
|
+
*
|
|
2082
|
+
* // Combine with custom icon
|
|
2083
|
+
* const places = await PlacesModule.get(map, {
|
|
2084
|
+
* icon: {
|
|
2085
|
+
* categoryIcons: [{
|
|
2086
|
+
* id: 'ELECTRIC_VEHICLE_STATION',
|
|
2087
|
+
* image: customEvIconSvg,
|
|
2088
|
+
* pixelRatio: 2
|
|
2089
|
+
* }]
|
|
2090
|
+
* },
|
|
2091
|
+
* evAvailability: { enabled: true }
|
|
2092
|
+
* });
|
|
2093
|
+
* ```
|
|
2094
|
+
*
|
|
2095
|
+
* @group Places
|
|
2096
|
+
*/
|
|
2097
|
+
export declare type EVAvailabilityConfig = {
|
|
2098
|
+
/**
|
|
2099
|
+
* Enable or disable EV availability display.
|
|
2100
|
+
*
|
|
2101
|
+
* @remarks
|
|
2102
|
+
* Must be explicitly set to `true` to display availability.
|
|
2103
|
+
*/
|
|
2104
|
+
enabled?: boolean;
|
|
2105
|
+
/**
|
|
2106
|
+
* Availability ratio threshold for determining available vs occupied.
|
|
2107
|
+
*
|
|
2108
|
+
* @remarks
|
|
2109
|
+
* - `ratio >= threshold`: Available (green)
|
|
2110
|
+
* - `ratio < threshold`: Occupied (red)
|
|
2111
|
+
*
|
|
2112
|
+
* @default 0
|
|
2113
|
+
*/
|
|
2114
|
+
threshold?: number;
|
|
2115
|
+
/**
|
|
2116
|
+
* Custom function to format the availability text.
|
|
2117
|
+
*
|
|
2118
|
+
* @param available - Number of available charging points
|
|
2119
|
+
* @param total - Total number of charging points
|
|
2120
|
+
* @returns Formatted availability text
|
|
2121
|
+
*
|
|
2122
|
+
* @default (available, total) => `${available}/${total}`
|
|
2123
|
+
*/
|
|
2124
|
+
formatText?: (available: number, total: number) => string;
|
|
2125
|
+
};
|
|
2126
|
+
|
|
2016
2127
|
/**
|
|
2017
2128
|
* Optional events configuration for a map module.
|
|
2018
2129
|
*
|
|
@@ -4418,16 +4529,28 @@ export declare type PlaceLayersConfig = {
|
|
|
4418
4529
|
* - Data-driven styling via MapLibre expressions
|
|
4419
4530
|
* - Interactive events (click, hover, etc.)
|
|
4420
4531
|
* - Support for custom feature properties
|
|
4532
|
+
* - EV charging station availability display (opt-in)
|
|
4421
4533
|
*
|
|
4422
4534
|
* **Marker Styles:**
|
|
4423
4535
|
* - `pin`: Traditional teardrop-shaped map pins
|
|
4424
4536
|
* - `circle`: Simple circular markers
|
|
4425
4537
|
* - `base-map`: Mimics built-in POI layer styling
|
|
4426
4538
|
*
|
|
4539
|
+
* **EV Charging Station Availability:**
|
|
4540
|
+
* When displaying EV charging stations with availability data from
|
|
4541
|
+
* {@link getPlacesWithEVAvailability}, the module can:
|
|
4542
|
+
* - Show available/total charging points (e.g., "3/10")
|
|
4543
|
+
* - Color-code availability (green = good, orange = limited, red = none/low)
|
|
4544
|
+
* - Display as formatted text within the station's label
|
|
4545
|
+
*
|
|
4546
|
+
* This feature is disabled by default. To enable it, set `evAvailability.enabled` to `true`
|
|
4547
|
+
* in the configuration.
|
|
4548
|
+
*
|
|
4427
4549
|
* **Common Use Cases:**
|
|
4428
4550
|
* - Search result visualization
|
|
4429
4551
|
* - Custom location markers
|
|
4430
4552
|
* - Store locators
|
|
4553
|
+
* - EV charging station maps with real-time availability
|
|
4431
4554
|
* - Delivery/pickup points
|
|
4432
4555
|
* - Saved locations display
|
|
4433
4556
|
*
|
|
@@ -4447,6 +4570,19 @@ export declare type PlaceLayersConfig = {
|
|
|
4447
4570
|
* // Display places from search
|
|
4448
4571
|
* await placesModule.show(searchResults);
|
|
4449
4572
|
*
|
|
4573
|
+
* // EV Charging Stations - Opt-in to availability display
|
|
4574
|
+
* const evStations = await PlacesModule.get(map, {
|
|
4575
|
+
* evAvailability: { enabled: true }
|
|
4576
|
+
* });
|
|
4577
|
+
* const results = await search({ poiCategories: ['ELECTRIC_VEHICLE_STATION'] });
|
|
4578
|
+
* evStations.show(await getPlacesWithEVAvailability(results)); // Shows availability
|
|
4579
|
+
*
|
|
4580
|
+
* // Granular control: Enable for searched stations only, background stations without
|
|
4581
|
+
* const bgStations = await PlacesModule.get(map); // EV availability disabled
|
|
4582
|
+
* const searched = await PlacesModule.get(map, {
|
|
4583
|
+
* evAvailability: { enabled: true }
|
|
4584
|
+
* });
|
|
4585
|
+
*
|
|
4450
4586
|
* // Handle clicks
|
|
4451
4587
|
* placesModule.events.on('click', (feature) => {
|
|
4452
4588
|
* console.log('Clicked:', feature.properties);
|
|
@@ -4777,6 +4913,16 @@ export declare type PlacesModuleConfig = MapModuleCommonConfig & {
|
|
|
4777
4913
|
* * Use this only if you need fine MapLibre control on how places are displayed.
|
|
4778
4914
|
*/
|
|
4779
4915
|
layers?: PlaceLayersConfig;
|
|
4916
|
+
/**
|
|
4917
|
+
* Configuration for EV charging station availability display.
|
|
4918
|
+
*
|
|
4919
|
+
* @remarks
|
|
4920
|
+
* Disabled by default - set `enabled: true` to show availability on EV stations.
|
|
4921
|
+
* Requires calling {@link getPlacesWithEVAvailability} to fetch availability data.
|
|
4922
|
+
*
|
|
4923
|
+
* @default undefined (disabled)
|
|
4924
|
+
*/
|
|
4925
|
+
evAvailability?: EVAvailabilityConfig;
|
|
4780
4926
|
/**
|
|
4781
4927
|
* Additional properties to compute for each place feature.
|
|
4782
4928
|
*
|
|
@@ -4944,20 +5090,19 @@ export declare type PlaceTextConfig = {
|
|
|
4944
5090
|
*/
|
|
4945
5091
|
haloWidth?: DataDrivenPropertyValueSpecification<number>;
|
|
4946
5092
|
/**
|
|
4947
|
-
* Text offset from the icon in ems
|
|
5093
|
+
* Text offset from the icon in ems.
|
|
4948
5094
|
*
|
|
4949
|
-
*
|
|
5095
|
+
* Applies uniformly to all anchor positions (top, left, right).
|
|
5096
|
+
* Positive values increase distance from icon.
|
|
4950
5097
|
*
|
|
4951
|
-
* @default
|
|
5098
|
+
* @default undefined (uses automatic offset calculation based on icon size)
|
|
4952
5099
|
*
|
|
4953
5100
|
* @example
|
|
4954
5101
|
* ```typescript
|
|
4955
|
-
* offset:
|
|
4956
|
-
*
|
|
4957
|
-
* offset: [1, 0] // Position text to the right
|
|
5102
|
+
* offset: 1.5 // Position text 1.5em away from icon in whichever direction the renderer chooses
|
|
4958
5103
|
* ```
|
|
4959
5104
|
*/
|
|
4960
|
-
offset?:
|
|
5105
|
+
offset?: number;
|
|
4961
5106
|
};
|
|
4962
5107
|
|
|
4963
5108
|
/**
|
|
@@ -5701,6 +5846,7 @@ export declare const ROUTE_LINE_FOREGROUND_WIDTH: ExpressionSpecification;
|
|
|
5701
5846
|
|
|
5702
5847
|
/**
|
|
5703
5848
|
* Main route outline color.
|
|
5849
|
+
* @ignore
|
|
5704
5850
|
*/
|
|
5705
5851
|
export declare const ROUTE_LINE_OUTLINE_COLOR = "#105287";
|
|
5706
5852
|
|
|
@@ -6824,7 +6970,7 @@ export declare type StyleChangeHandler = {
|
|
|
6824
6970
|
*
|
|
6825
6971
|
* @returns void or a Promise that resolves when preparation is complete
|
|
6826
6972
|
*/
|
|
6827
|
-
onStyleAboutToChange
|
|
6973
|
+
onStyleAboutToChange?: () => void | Promise<void>;
|
|
6828
6974
|
/**
|
|
6829
6975
|
* Callback invoked after a new style has been fully loaded.
|
|
6830
6976
|
*
|
|
@@ -6834,7 +6980,7 @@ export declare type StyleChangeHandler = {
|
|
|
6834
6980
|
*
|
|
6835
6981
|
* @returns void or a Promise that resolves when reinitialization is complete
|
|
6836
6982
|
*/
|
|
6837
|
-
onStyleChanged
|
|
6983
|
+
onStyleChanged?: () => void | Promise<void>;
|
|
6838
6984
|
};
|
|
6839
6985
|
|
|
6840
6986
|
/**
|