@tomtom-org/maps-sdk 0.40.1 → 0.41.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 +27 -0
- package/README.md +21 -0
- package/core/dist/core.es.js +1 -1
- package/core/dist/core.es.js.map +1 -1
- package/core/dist/index.d.ts +10 -22
- package/core/package.json +2 -2
- package/map/dist/THIRD_PARTY.txt +4 -4
- package/map/dist/index.d.ts +86 -56
- package/map/dist/map.es.js +1 -1
- package/map/dist/map.es.js.map +1 -1
- package/map/package.json +1 -1
- package/package.json +2 -2
- package/services/dist/index.d.ts +84 -75
- package/services/dist/services.es.js +22 -22
- package/services/dist/services.es.js.map +1 -1
package/core/dist/index.d.ts
CHANGED
|
@@ -513,12 +513,8 @@ export declare type ChargingConnectionInfo = {
|
|
|
513
513
|
* ```typescript
|
|
514
514
|
* const chargingPark: ChargingPark = {
|
|
515
515
|
* connectors: [
|
|
516
|
-
* {
|
|
517
|
-
* {
|
|
518
|
-
* ],
|
|
519
|
-
* connectorCounts: [
|
|
520
|
-
* { connector: {...}, count: 4, statusCounts: {} },
|
|
521
|
-
* { connector: {...}, count: 2, statusCounts: {} }
|
|
516
|
+
* { connector: {...}, count: 4 },
|
|
517
|
+
* { connector: {...}, count: 2 }
|
|
522
518
|
* ]
|
|
523
519
|
* };
|
|
524
520
|
* ```
|
|
@@ -526,13 +522,6 @@ export declare type ChargingConnectionInfo = {
|
|
|
526
522
|
* @group Place
|
|
527
523
|
*/
|
|
528
524
|
export declare type ChargingPark = {
|
|
529
|
-
/**
|
|
530
|
-
* Array of all unique connector types offered at this charging park.
|
|
531
|
-
*
|
|
532
|
-
* Each connector represents a different charging standard available.
|
|
533
|
-
* Use this to determine compatibility with your vehicle.
|
|
534
|
-
*/
|
|
535
|
-
connectors: Connector[];
|
|
536
525
|
/**
|
|
537
526
|
* Count of connectors grouped by type and power level.
|
|
538
527
|
*
|
|
@@ -544,7 +533,7 @@ export declare type ChargingPark = {
|
|
|
544
533
|
* For real-time availability, use the availability property instead.
|
|
545
534
|
* This field shows total counts regardless of current operational status.
|
|
546
535
|
*/
|
|
547
|
-
|
|
536
|
+
connectors: ConnectorCount[];
|
|
548
537
|
};
|
|
549
538
|
|
|
550
539
|
/**
|
|
@@ -557,7 +546,6 @@ export declare type ChargingPark = {
|
|
|
557
546
|
* ```typescript
|
|
558
547
|
* const parkWithAvailability: ChargingParkWithAvailability = {
|
|
559
548
|
* connectors: [...],
|
|
560
|
-
* connectorCounts: [...],
|
|
561
549
|
* availability: {
|
|
562
550
|
* id: 'park-123',
|
|
563
551
|
* chargingStations: [...],
|
|
@@ -583,7 +571,7 @@ export declare type ChargingParkWithAvailability = ChargingPark & {
|
|
|
583
571
|
* 2. Call the EV Charging Stations Availability service
|
|
584
572
|
* 3. Merge the result into this property
|
|
585
573
|
*/
|
|
586
|
-
availability
|
|
574
|
+
availability: ChargingStationsAvailability;
|
|
587
575
|
};
|
|
588
576
|
|
|
589
577
|
/**
|
|
@@ -631,6 +619,7 @@ export declare type ChargingPaymentOption = {
|
|
|
631
619
|
* Individual charging point (EVSE - Electric Vehicle Supply Equipment).
|
|
632
620
|
*
|
|
633
621
|
* Represents a single charging unit with one or more connectors.
|
|
622
|
+
* A charging point can have several charging connectors, of which only one can be used at a time.
|
|
634
623
|
*
|
|
635
624
|
* @remarks
|
|
636
625
|
* A charging station typically contains multiple charging points.
|
|
@@ -829,7 +818,7 @@ export declare type ChargingSpeed = 'slow' | 'regular' | 'fast' | 'ultra-fast';
|
|
|
829
818
|
* Electric vehicle charging station.
|
|
830
819
|
*
|
|
831
820
|
* Represents a complete charging station facility with one or more charging points.
|
|
832
|
-
* A station is typically at a single location but may have multiple charging
|
|
821
|
+
* A station is typically at a single location but may have multiple charging points.
|
|
833
822
|
*
|
|
834
823
|
* @example
|
|
835
824
|
* ```typescript
|
|
@@ -1367,7 +1356,7 @@ export declare type Connector = {
|
|
|
1367
1356
|
/**
|
|
1368
1357
|
* Unique identifier for this connector.
|
|
1369
1358
|
*/
|
|
1370
|
-
id
|
|
1359
|
+
id?: string;
|
|
1371
1360
|
/**
|
|
1372
1361
|
* Physical connector type/standard.
|
|
1373
1362
|
*
|
|
@@ -1798,7 +1787,6 @@ export declare type EntryPointType = 'main' | 'minor';
|
|
|
1798
1787
|
* // EV-specific properties
|
|
1799
1788
|
* chargingPark: {
|
|
1800
1789
|
* connectors: [...],
|
|
1801
|
-
* connectorCounts: [...],
|
|
1802
1790
|
* availability: {...}
|
|
1803
1791
|
* }
|
|
1804
1792
|
* };
|
|
@@ -1806,14 +1794,14 @@ export declare type EntryPointType = 'main' | 'minor';
|
|
|
1806
1794
|
*
|
|
1807
1795
|
* @group Place
|
|
1808
1796
|
*/
|
|
1809
|
-
export declare type
|
|
1797
|
+
export declare type EVChargingStationWithAvailabilityPlaceProps = Omit<CommonPlaceProps, 'chargingPark'> & {
|
|
1810
1798
|
/**
|
|
1811
1799
|
* Charging infrastructure and availability information.
|
|
1812
1800
|
*
|
|
1813
1801
|
* Contains details about available connectors, counts, and optionally
|
|
1814
1802
|
* real-time availability status if fetched from the availability service.
|
|
1815
1803
|
*/
|
|
1816
|
-
chargingPark
|
|
1804
|
+
chargingPark: ChargingParkWithAvailability;
|
|
1817
1805
|
};
|
|
1818
1806
|
|
|
1819
1807
|
/**
|
|
@@ -2961,7 +2949,7 @@ export declare type MapcodeType = 'Local' | 'International' | 'Alternative';
|
|
|
2961
2949
|
* Merges the global configuration into the given one, with the latter having priority.
|
|
2962
2950
|
* @ignore
|
|
2963
2951
|
*/
|
|
2964
|
-
export declare const mergeFromGlobal: <T extends Partial<GlobalConfig>>(givenConfig?: T) => T;
|
|
2952
|
+
export declare const mergeFromGlobal: <T extends Partial<GlobalConfig>>(givenConfig?: T) => GlobalConfig & T;
|
|
2965
2953
|
|
|
2966
2954
|
/**
|
|
2967
2955
|
* Date and time with convenient derived properties.
|
package/core/package.json
CHANGED
package/map/dist/THIRD_PARTY.txt
CHANGED
|
@@ -63,7 +63,7 @@ terms above.
|
|
|
63
63
|
---
|
|
64
64
|
|
|
65
65
|
Name: @turf/helpers
|
|
66
|
-
Version: 7.3.
|
|
66
|
+
Version: 7.3.2
|
|
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.2
|
|
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.2
|
|
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.16.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
|
@@ -3607,6 +3607,14 @@ export declare type IncidentsConfig = MapModuleCommonConfig & IncidentsCommonCon
|
|
|
3607
3607
|
*/
|
|
3608
3608
|
export declare const INDEX_TYPE = "indexType";
|
|
3609
3609
|
|
|
3610
|
+
/**
|
|
3611
|
+
* Complete TomTom map parameters after merging with global configuration.
|
|
3612
|
+
* This type represents the fully resolved configuration used internally by the SDK.
|
|
3613
|
+
*
|
|
3614
|
+
* @ignore
|
|
3615
|
+
*/
|
|
3616
|
+
export declare type InternalTomTomMapParams = GlobalConfig & TomTomMapParams;
|
|
3617
|
+
|
|
3610
3618
|
/**
|
|
3611
3619
|
* Function signature to filter layers.
|
|
3612
3620
|
* @ignore
|
|
@@ -3906,7 +3914,7 @@ declare const mapFonts: readonly ["Noto-Regular", "NotoSans-MediumItalic", "Noto
|
|
|
3906
3914
|
* - Rendering options (antialiasing, terrain)
|
|
3907
3915
|
* - Localization and accessibility
|
|
3908
3916
|
*
|
|
3909
|
-
* @see [MapLibre MapOptions](https://maplibre.org/maplibre-gl-js
|
|
3917
|
+
* @see [MapLibre MapOptions](https://maplibre.org/maplibre-gl-js/docs/API/type-aliases/MapOptions/)
|
|
3910
3918
|
*
|
|
3911
3919
|
* @group Map
|
|
3912
3920
|
*/
|
|
@@ -7062,38 +7070,38 @@ export declare type ToBeAddedLayerSpecWithoutSource<L extends LayerSpecification
|
|
|
7062
7070
|
* ```typescript
|
|
7063
7071
|
* import { TomTomMap } from '@tomtom-international/maps-sdk-js/map';
|
|
7064
7072
|
*
|
|
7065
|
-
* const map = new TomTomMap(
|
|
7066
|
-
*
|
|
7073
|
+
* const map = new TomTomMap({
|
|
7074
|
+
* key: 'YOUR_API_KEY',
|
|
7075
|
+
* style: 'standardLight',
|
|
7076
|
+
* mapLibre: {
|
|
7067
7077
|
* container: 'map',
|
|
7068
7078
|
* center: [4.9041, 52.3676],
|
|
7069
7079
|
* zoom: 10
|
|
7070
|
-
* },
|
|
7071
|
-
* {
|
|
7072
|
-
* key: 'YOUR_API_KEY',
|
|
7073
|
-
* style: 'standardLight'
|
|
7074
7080
|
* }
|
|
7075
|
-
* );
|
|
7081
|
+
* });
|
|
7076
7082
|
* ```
|
|
7077
7083
|
*
|
|
7078
7084
|
* @example
|
|
7079
7085
|
* With modules and configuration:
|
|
7080
7086
|
* ```typescript
|
|
7081
|
-
* const map = new TomTomMap(
|
|
7082
|
-
*
|
|
7083
|
-
* {
|
|
7084
|
-
*
|
|
7085
|
-
*
|
|
7086
|
-
*
|
|
7087
|
-
*
|
|
7088
|
-
*
|
|
7089
|
-
*
|
|
7090
|
-
*
|
|
7091
|
-
*
|
|
7092
|
-
*
|
|
7093
|
-
*
|
|
7094
|
-
*
|
|
7087
|
+
* const map = new TomTomMap({
|
|
7088
|
+
* key: 'YOUR_API_KEY',
|
|
7089
|
+
* style: {
|
|
7090
|
+
* type: 'standard',
|
|
7091
|
+
* id: 'standardDark',
|
|
7092
|
+
* include: ['trafficFlow', 'trafficIncidents']
|
|
7093
|
+
* },
|
|
7094
|
+
* language: 'en-US',
|
|
7095
|
+
* events: {
|
|
7096
|
+
* precisionMode: 'point-then-box',
|
|
7097
|
+
* cursorOnHover: 'pointer'
|
|
7098
|
+
* },
|
|
7099
|
+
* mapLibre: {
|
|
7100
|
+
* container: 'map',
|
|
7101
|
+
* center: [-74.006, 40.7128],
|
|
7102
|
+
* zoom: 12
|
|
7095
7103
|
* }
|
|
7096
|
-
* );
|
|
7104
|
+
* });
|
|
7097
7105
|
*
|
|
7098
7106
|
* // Access MapLibre functionality directly
|
|
7099
7107
|
* map.mapLibreMap.on('load', () => {
|
|
@@ -7168,18 +7176,14 @@ export declare class TomTomMap {
|
|
|
7168
7176
|
/**
|
|
7169
7177
|
* @ignore
|
|
7170
7178
|
*/
|
|
7171
|
-
_params:
|
|
7179
|
+
_params: InternalTomTomMapParams;
|
|
7172
7180
|
styleLightDarkTheme: LightDark;
|
|
7173
7181
|
private readonly styleChangeHandlers;
|
|
7174
7182
|
/**
|
|
7175
7183
|
* Constructs a new TomTom Map instance and attaches it to a DOM element.
|
|
7176
7184
|
*
|
|
7177
|
-
* @param
|
|
7178
|
-
* Includes
|
|
7179
|
-
* See {@link MapLibreOptions} for all available options.
|
|
7180
|
-
*
|
|
7181
|
-
* @param mapParams - TomTom-specific parameters including API key, style, and events.
|
|
7182
|
-
* Can be partially specified here if already set via global configuration.
|
|
7185
|
+
* @param mapParams - Combined TomTom and MapLibre parameters for map initialization.
|
|
7186
|
+
* Includes API key, style, events, and MapLibre options like container, center, zoom, etc.
|
|
7183
7187
|
* See {@link TomTomMapParams} for all available parameters.
|
|
7184
7188
|
*
|
|
7185
7189
|
* @remarks
|
|
@@ -7196,17 +7200,32 @@ export declare class TomTomMap {
|
|
|
7196
7200
|
* @example
|
|
7197
7201
|
* Minimal initialization:
|
|
7198
7202
|
* ```typescript
|
|
7199
|
-
* const map = new TomTomMap(
|
|
7200
|
-
*
|
|
7201
|
-
*
|
|
7202
|
-
*
|
|
7203
|
+
* const map = new TomTomMap({
|
|
7204
|
+
* key: 'YOUR_API_KEY',
|
|
7205
|
+
* mapLibre: {
|
|
7206
|
+
* container: 'map',
|
|
7207
|
+
* center: [0, 0],
|
|
7208
|
+
* zoom: 2
|
|
7209
|
+
* }
|
|
7210
|
+
* });
|
|
7203
7211
|
* ```
|
|
7204
7212
|
*
|
|
7205
7213
|
* @example
|
|
7206
7214
|
* Full configuration:
|
|
7207
7215
|
* ```typescript
|
|
7208
|
-
* const map = new TomTomMap(
|
|
7209
|
-
*
|
|
7216
|
+
* const map = new TomTomMap({
|
|
7217
|
+
* key: 'YOUR_API_KEY',
|
|
7218
|
+
* style: {
|
|
7219
|
+
* type: 'standard',
|
|
7220
|
+
* id: 'standardLight',
|
|
7221
|
+
* include: ['trafficFlow', 'hillshade']
|
|
7222
|
+
* },
|
|
7223
|
+
* language: 'en-US',
|
|
7224
|
+
* events: {
|
|
7225
|
+
* precisionMode: 'point-then-box',
|
|
7226
|
+
* paddingBoxPx: 10
|
|
7227
|
+
* },
|
|
7228
|
+
* mapLibre: {
|
|
7210
7229
|
* container: 'map',
|
|
7211
7230
|
* center: [-122.4194, 37.7749],
|
|
7212
7231
|
* zoom: 13,
|
|
@@ -7215,21 +7234,8 @@ export declare class TomTomMap {
|
|
|
7215
7234
|
* antialias: true,
|
|
7216
7235
|
* maxZoom: 18,
|
|
7217
7236
|
* minZoom: 8
|
|
7218
|
-
* },
|
|
7219
|
-
* {
|
|
7220
|
-
* key: 'YOUR_API_KEY',
|
|
7221
|
-
* style: {
|
|
7222
|
-
* type: 'standard',
|
|
7223
|
-
* id: 'standardLight',
|
|
7224
|
-
* include: ['trafficFlow', 'hillshade']
|
|
7225
|
-
* },
|
|
7226
|
-
* language: 'en-US',
|
|
7227
|
-
* events: {
|
|
7228
|
-
* precisionMode: 'point-then-box',
|
|
7229
|
-
* paddingBoxPx: 10
|
|
7230
|
-
* }
|
|
7231
7237
|
* }
|
|
7232
|
-
* );
|
|
7238
|
+
* });
|
|
7233
7239
|
* ```
|
|
7234
7240
|
*
|
|
7235
7241
|
* @throws Will log errors if RTL text plugin fails to load (non-blocking)
|
|
@@ -7241,7 +7247,7 @@ export declare class TomTomMap {
|
|
|
7241
7247
|
* @see [Map Styles Guide](https://docs.tomtom.com/maps-sdk-js/guides/map/map-styles)
|
|
7242
7248
|
* @see [User Interaction Events Guide](https://docs.tomtom.com/maps-sdk-js/guides/map/user-events)
|
|
7243
7249
|
*/
|
|
7244
|
-
constructor(
|
|
7250
|
+
constructor(mapParams: TomTomMapParams);
|
|
7245
7251
|
private loadRTLTextPlugin;
|
|
7246
7252
|
/**
|
|
7247
7253
|
* Dynamically loads the MapLibre CSS stylesheet from CDN.
|
|
@@ -7579,25 +7585,29 @@ export declare class TomTomMap {
|
|
|
7579
7585
|
/**
|
|
7580
7586
|
* Parameters for initializing a TomTom map instance.
|
|
7581
7587
|
*
|
|
7582
|
-
* Combines global SDK configuration with map-specific settings like style and
|
|
7588
|
+
* Combines global SDK configuration with map-specific settings like style, events, and MapLibre options.
|
|
7589
|
+
* All GlobalConfig properties (key, baseURL, etc.) are optional and will be merged from global configuration.
|
|
7590
|
+
* Only mapLibre.container is strictly required.
|
|
7583
7591
|
*
|
|
7584
7592
|
* @example
|
|
7585
7593
|
* ```typescript
|
|
7586
7594
|
* const mapParams: TomTomMapParams = {
|
|
7587
7595
|
* key: 'your-api-key',
|
|
7588
|
-
* container: 'map-container',
|
|
7589
|
-
* center: [4.9041, 52.3676],
|
|
7590
|
-
* zoom: 12,
|
|
7591
7596
|
* style: 'standardLight',
|
|
7592
7597
|
* events: {
|
|
7593
7598
|
* onClick: (event) => console.log('Map clicked', event)
|
|
7599
|
+
* },
|
|
7600
|
+
* mapLibre: {
|
|
7601
|
+
* container: 'map-container',
|
|
7602
|
+
* center: [4.9041, 52.3676],
|
|
7603
|
+
* zoom: 12
|
|
7594
7604
|
* }
|
|
7595
7605
|
* };
|
|
7596
7606
|
* ```
|
|
7597
7607
|
*
|
|
7598
7608
|
* @group Map
|
|
7599
7609
|
*/
|
|
7600
|
-
export declare type TomTomMapParams = GlobalConfig & {
|
|
7610
|
+
export declare type TomTomMapParams = Partial<GlobalConfig> & {
|
|
7601
7611
|
/**
|
|
7602
7612
|
* Map style to load.
|
|
7603
7613
|
*
|
|
@@ -7637,6 +7647,26 @@ export declare type TomTomMapParams = GlobalConfig & {
|
|
|
7637
7647
|
* ```
|
|
7638
7648
|
*/
|
|
7639
7649
|
events?: MapEventsConfig;
|
|
7650
|
+
/**
|
|
7651
|
+
* MapLibre-specific options for map configuration.
|
|
7652
|
+
*
|
|
7653
|
+
* Includes options for viewport settings, interaction controls, rendering options, and more.
|
|
7654
|
+
*
|
|
7655
|
+
* @example
|
|
7656
|
+
* ```typescript
|
|
7657
|
+
* mapLibre: {
|
|
7658
|
+
* container: 'map',
|
|
7659
|
+
* center: [4.9041, 52.3676],
|
|
7660
|
+
* zoom: 12,
|
|
7661
|
+
* pitch: 45,
|
|
7662
|
+
* bearing: -17.6,
|
|
7663
|
+
* antialias: true,
|
|
7664
|
+
* maxZoom: 18,
|
|
7665
|
+
* minZoom: 8
|
|
7666
|
+
* }
|
|
7667
|
+
* ```
|
|
7668
|
+
*/
|
|
7669
|
+
mapLibre: MapLibreOptions;
|
|
7640
7670
|
};
|
|
7641
7671
|
|
|
7642
7672
|
/**
|