@tomtom-org/maps-sdk 0.45.9 → 0.45.11

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.
@@ -1,6 +1,6 @@
1
1
  import { Feature } from 'geojson';
2
2
  import { FeatureCollection } from 'geojson';
3
- import { GeoJsonObject } from 'geojson';
3
+ import { GeoJSON as GeoJSON_2 } from 'geojson';
4
4
  import { GeoJsonProperties } from 'geojson';
5
5
  import { Geometry } from 'geojson';
6
6
  import { LineString } from 'geojson';
@@ -304,7 +304,7 @@ export declare const bboxExpandedWithBBox: (bboxToContain: OptionalBBox, bboxToE
304
304
  * @param geoJson
305
305
  * @param bboxToExpand
306
306
  */
307
- export declare const bboxExpandedWithGeoJSON: (geoJson: GeoJsonObject, bboxToExpand?: BBox) => OptionalBBox;
307
+ export declare const bboxExpandedWithGeoJSON: (geoJson: GeoJSON_2, bboxToExpand?: BBox) => OptionalBBox;
308
308
 
309
309
  /**
310
310
  * Expands the given bounding box with the given position.
@@ -1513,7 +1513,6 @@ export declare const connectorTypes: readonly ["StandardHouseholdCountrySpecific
1513
1513
  * startPointIndex: 0,
1514
1514
  * endPointIndex: 150,
1515
1515
  * countryCodeISO3: 'NLD', // Netherlands
1516
- * lengthInMeters: 25000
1517
1516
  * };
1518
1517
  * ```
1519
1518
  *
@@ -2515,8 +2514,8 @@ export declare type Guidance = {
2515
2514
  *
2516
2515
  * Accepts various formats:
2517
2516
  * - `BBox`: Direct GeoJSON bounding box array `[west, south, east, north]`
2518
- * - `GeoJsonObject`: Any GeoJSON object with a `bbox` property or from which bounds can be calculated
2519
- * - `GeoJsonObject[]`: Array of GeoJSON objects (convenience extension to standard GeoJSON)
2517
+ * - `GeoJSON`: Any GeoJSON object with a `bbox` property or from which bounds can be calculated
2518
+ * - `GeoJSON[]`: Array of GeoJSON objects (convenience extension to standard GeoJSON)
2520
2519
  *
2521
2520
  * @remarks
2522
2521
  * Bounding boxes follow the format: `[minLon, minLat, maxLon, maxLat]` or `[west, south, east, north]`
@@ -2540,7 +2539,7 @@ export declare type Guidance = {
2540
2539
  *
2541
2540
  * @group Shared
2542
2541
  */
2543
- export declare type HasBBox = BBox | GeoJsonObject | GeoJsonObject[];
2542
+ export declare type HasBBox = BBox | GeoJSON_2 | GeoJSON_2[];
2544
2543
 
2545
2544
  /**
2546
2545
  * Has an Electric vehicle charging connector.
@@ -4321,34 +4320,6 @@ export declare type SectionProps = {
4321
4320
  * Zero-based index into the route's LineString coordinates array.
4322
4321
  */
4323
4322
  endPointIndex: number;
4324
- /**
4325
- * Elapsed time in seconds from route start to the beginning of this section.
4326
- */
4327
- startTravelTimeInSeconds?: number;
4328
- /**
4329
- * Elapsed time in seconds from route start to the end of this section.
4330
- */
4331
- endTravelTimeInSeconds?: number;
4332
- /**
4333
- * Duration in seconds to traverse this section.
4334
- *
4335
- * Calculated as: endTravelTimeInSeconds - startTravelTimeInSeconds
4336
- */
4337
- durationInSeconds?: number;
4338
- /**
4339
- * Cumulative distance in meters from route start to the beginning of this section.
4340
- */
4341
- startLengthInMeters?: number;
4342
- /**
4343
- * Cumulative distance in meters from route start to the end of this section.
4344
- */
4345
- endLengthInMeters?: number;
4346
- /**
4347
- * Length in meters of this section.
4348
- *
4349
- * Calculated as: endLengthInMeters - startLengthInMeters
4350
- */
4351
- lengthInMeters?: number;
4352
4323
  };
4353
4324
 
4354
4325
  /**
@@ -17,6 +17,7 @@ import { FeatureCollection } from 'geojson';
17
17
  import { GeoJsonProperties } from 'geojson';
18
18
  import { GeoJSONSource } from 'maplibre-gl';
19
19
  import { GeoJSONSourceSpecification } from 'maplibre-gl';
20
+ import { Geometry } from 'geojson';
20
21
  import { GetPositionEntryPointOption } from '@tomtom-org/maps-sdk/core';
21
22
  import { GlobalConfig } from '@tomtom-org/maps-sdk/core';
22
23
  import { Instruction } from '@tomtom-org/maps-sdk/core';
@@ -5888,63 +5889,58 @@ export declare type POIsModuleConfig = MapModuleCommonConfig & {
5888
5889
  * @group POIs
5889
5890
  * @see https://docs.tomtom.com/map-display-api/documentation/tomtom-orbis-maps/vector/content#poi for more details on the available properties from the vector tile features
5890
5891
  */
5891
- export declare type POIsModuleFeature = Omit<MapGeoJSONFeature, 'properties'> & {
5892
+ export declare type POIsModuleFeature = Feature<Point, {
5892
5893
  /**
5893
- * POI-specific properties from the vector tile data.
5894
+ * A unique Point of Interest identifier.
5895
+ *
5896
+ * @remarks
5897
+ * This ID can be used across other TomTom services to fetch additional
5898
+ * information about the POI (e.g., via Place by ID service).
5899
+ *
5900
+ * @example '528009002822995'
5894
5901
  */
5895
- properties: {
5896
- /**
5897
- * A unique Point of Interest identifier.
5898
- *
5899
- * @remarks
5900
- * This ID can be used across other TomTom services to fetch additional
5901
- * information about the POI (e.g., via Place by ID service).
5902
- *
5903
- * @example '528009002822995'
5904
- */
5905
- id: string;
5906
- /**
5907
- * Feature name in the native language.
5908
- *
5909
- * @remarks
5910
- * Displayed in NGT (Neutral Ground Truth) language, which is the native
5911
- * language of each country respectively.
5912
- *
5913
- * @example 'Starbucks'
5914
- */
5915
- name: string;
5916
- /**
5917
- * POI category identifier.
5918
- *
5919
- * @remarks
5920
- * Used for styling and filtering purposes. Maps to a specific POI type
5921
- * (e.g., RESTAURANT, HOTEL_MOTEL).
5922
- *
5923
- * @example 'restaurant'
5924
- */
5925
- category: string;
5926
- /**
5927
- * Broad category group this POI belongs to.
5928
- *
5929
- * @remarks
5930
- * Groups similar categories together for easier filtering and styling
5931
- * (e.g., 'Food & Drink', 'Shopping', 'Transportation').
5932
- *
5933
- * @example 'Food & Drink'
5934
- */
5935
- group: string;
5936
- /**
5937
- * Display priority of the POI.
5938
- *
5939
- * @remarks
5940
- * Lower values indicate higher importance. Used by the map renderer to
5941
- * determine which POIs to show when space is limited.
5942
- *
5943
- * @example 1 // High priority, 10 // Low priority
5944
- */
5945
- priority: number;
5946
- };
5947
- };
5902
+ id: string;
5903
+ /**
5904
+ * Feature name in the native language.
5905
+ *
5906
+ * @remarks
5907
+ * Displayed in NGT (Neutral Ground Truth) language, which is the native
5908
+ * language of each country respectively.
5909
+ *
5910
+ * @example 'Starbucks'
5911
+ */
5912
+ name: string;
5913
+ /**
5914
+ * POI category identifier.
5915
+ *
5916
+ * @remarks
5917
+ * Used for styling and filtering purposes. Maps to a specific POI type
5918
+ * (e.g., RESTAURANT, HOTEL_MOTEL).
5919
+ *
5920
+ * @example 'restaurant'
5921
+ */
5922
+ category: string;
5923
+ /**
5924
+ * Broad category group this POI belongs to.
5925
+ *
5926
+ * @remarks
5927
+ * Groups similar categories together for easier filtering and styling
5928
+ * (e.g., 'Food & Drink', 'Shopping', 'Transportation').
5929
+ *
5930
+ * @example 'Food & Drink'
5931
+ */
5932
+ group: string;
5933
+ /**
5934
+ * Display priority of the POI.
5935
+ *
5936
+ * @remarks
5937
+ * Lower values indicate higher importance. Used by the map renderer to
5938
+ * determine which POIs to show when space is limited.
5939
+ *
5940
+ * @example 1 // High priority, 10 // Low priority
5941
+ */
5942
+ priority: number;
5943
+ }>;
5948
5944
 
5949
5945
  /**
5950
5946
  * IDs of sources and layers for places of interest module.
@@ -6862,7 +6858,7 @@ export declare class RoutingModule extends AbstractMapModule<RoutingSourcesWithL
6862
6858
  waypoints: EventsModule<Waypoint<WaypointDisplayProps>>;
6863
6859
  chargingStops: EventsModule<RouteSection>;
6864
6860
  summaryBubbles: EventsModule<DisplayRouteSummary>;
6865
- incidents: EventsModule<RouteSections<DisplayTrafficSectionProps>>;
6861
+ incidents: EventsModule<RouteSection<DisplayTrafficSectionProps>>;
6866
6862
  vehicleRestricted: EventsModule<RouteSection>;
6867
6863
  ferries: EventsModule<RouteSection>;
6868
6864
  tollRoads: EventsModule<RouteSection>;
@@ -8612,46 +8608,44 @@ export declare class TrafficFlowModule extends AbstractMapModule<TrafficFlowSour
8612
8608
  *
8613
8609
  * @group Traffic Flow
8614
8610
  */
8615
- export declare type TrafficFlowModuleFeature = Omit<MapGeoJSONFeature, 'properties'> & {
8616
- properties: {
8617
- /**
8618
- * Road hierarchy category type.
8619
- */
8620
- roadCategory: RoadCategory;
8621
- /**
8622
- * Road hierarchy subcategory type. Only present for `street` and `service` road categories.
8623
- */
8624
- roadSubcategory?: RoadSubCategory;
8625
- /**
8626
- * Speed relative to free-flow traffic, ranging from 0.00 (standstill) to 1.00 (free flow).
8627
- */
8628
- relativeSpeed: number;
8629
- /**
8630
- * Indicates whether the road segment is in a left-hand traffic region.
8631
- */
8632
- leftHandTraffic: boolean;
8633
- /**
8634
- * Indicates whether the road segment is closed to traffic.
8635
- */
8636
- roadClosure: boolean;
8637
- /**
8638
- * Absolute speed in kilometers per hour.
8639
- */
8640
- absoluteSpeed?: number;
8641
- /**
8642
- * Indicates whether the flow covers different directional geometries (i.e. both directions of a two-way road).
8643
- */
8644
- partOfTwoWayRoad?: boolean;
8645
- /**
8646
- * OpenLR code describing the location of the flow section.
8647
- */
8648
- openlr?: string;
8649
- /**
8650
- * Positive integer ranking the importance of the road segment.
8651
- */
8652
- displayClass?: number;
8653
- };
8654
- };
8611
+ export declare type TrafficFlowModuleFeature = Feature<LineString, {
8612
+ /**
8613
+ * Road hierarchy category type.
8614
+ */
8615
+ roadCategory: RoadCategory;
8616
+ /**
8617
+ * Road hierarchy subcategory type. Only present for `street` and `service` road categories.
8618
+ */
8619
+ roadSubcategory?: RoadSubCategory;
8620
+ /**
8621
+ * Speed relative to free-flow traffic, ranging from 0.00 (standstill) to 1.00 (free flow).
8622
+ */
8623
+ relativeSpeed: number;
8624
+ /**
8625
+ * Indicates whether the road segment is in a left-hand traffic region.
8626
+ */
8627
+ leftHandTraffic: boolean;
8628
+ /**
8629
+ * Indicates whether the road segment is closed to traffic.
8630
+ */
8631
+ roadClosure: boolean;
8632
+ /**
8633
+ * Absolute speed in kilometers per hour.
8634
+ */
8635
+ absoluteSpeed?: number;
8636
+ /**
8637
+ * Indicates whether the flow covers different directional geometries (i.e. both directions of a two-way road).
8638
+ */
8639
+ partOfTwoWayRoad?: boolean;
8640
+ /**
8641
+ * OpenLR code describing the location of the flow section.
8642
+ */
8643
+ openlr?: string;
8644
+ /**
8645
+ * Positive integer ranking the importance of the road segment.
8646
+ */
8647
+ displayClass?: number;
8648
+ }>;
8655
8649
 
8656
8650
  /**
8657
8651
  * IDs of sources and layers for traffic flow module.
@@ -9107,52 +9101,44 @@ export declare class TrafficIncidentsModule extends AbstractMapModule<TrafficInc
9107
9101
  /**
9108
9102
  * Defines the structure of a traffic incident feature, which extends the basic GeoJSON feature with specific properties related to traffic incidents. This type is used to represent individual traffic incidents on the map, providing details such as the description of the incident, its severity, and the road category where it is occurring.
9109
9103
  */
9110
- export declare type TrafficIncidentsModuleFeature = Omit<MapGeoJSONFeature, 'properties'> & {
9104
+ export declare type TrafficIncidentsModuleFeature = Feature<Geometry, TrafficIncidentBaseProperties & {
9111
9105
  /**
9112
- * Properties specific to traffic incidents, extracted from the vector tile data.
9113
- *
9114
- * @remarks
9115
- * These properties include a unique identifier for the incident, a description of the incident, its category, the magnitude of any resulting delay, and information about the road where the incident is occurring (including road category and subcategory). Additionally, it indicates whether the incident is in a left-hand traffic region.
9106
+ * Description of the traffic incident, providing details about the nature of the incident.
9116
9107
  */
9117
- properties: TrafficIncidentBaseProperties & {
9118
- /**
9119
- * Description of the traffic incident, providing details about the nature of the incident.
9120
- */
9121
- description: string;
9122
- /**
9123
- * Road hierarchy category type.
9124
- */
9125
- roadCategory: RoadCategory;
9126
- /**
9127
- * Road hierarchy subcategory type, providing more specific classification of the road where the incident is occurring.
9128
- */
9129
- roadSubcategory: RoadSubCategory;
9130
- /**
9131
- * Indicates whether the traffic incident is occurring in a left-hand traffic region.
9132
- */
9133
- leftHandTraffic: boolean;
9134
- /**
9135
- * Indicates whether the incident covers different directional geometries (i.e. both directions of a two-way road).
9136
- */
9137
- partOfTwoWayRoad?: boolean;
9138
- /**
9139
- * Average speed within the incident area, in km/h.
9140
- */
9141
- averageSpeedKmph?: number;
9142
- /**
9143
- * OpenLR code describing the location of the incident.
9144
- */
9145
- openlr?: string;
9146
- /**
9147
- * Whether the incident is currently active or expected in the future.
9148
- */
9149
- timeValidity?: TrafficIncidentTimeValidity;
9150
- /**
9151
- * Positive integer ranking the importance of the road where the incident occurs.
9152
- */
9153
- displayClass?: number;
9154
- };
9155
- };
9108
+ description: string;
9109
+ /**
9110
+ * Road hierarchy category type.
9111
+ */
9112
+ roadCategory: RoadCategory;
9113
+ /**
9114
+ * Road hierarchy subcategory type, providing more specific classification of the road where the incident is occurring.
9115
+ */
9116
+ roadSubcategory: RoadSubCategory;
9117
+ /**
9118
+ * Indicates whether the traffic incident is occurring in a left-hand traffic region.
9119
+ */
9120
+ leftHandTraffic: boolean;
9121
+ /**
9122
+ * Indicates whether the incident covers different directional geometries (i.e. both directions of a two-way road).
9123
+ */
9124
+ partOfTwoWayRoad?: boolean;
9125
+ /**
9126
+ * Average speed within the incident area, in km/h.
9127
+ */
9128
+ averageSpeedKmph?: number;
9129
+ /**
9130
+ * OpenLR code describing the location of the incident.
9131
+ */
9132
+ openlr?: string;
9133
+ /**
9134
+ * Whether the incident is currently active or expected in the future.
9135
+ */
9136
+ timeValidity?: TrafficIncidentTimeValidity;
9137
+ /**
9138
+ * Positive integer ranking the importance of the road where the incident occurs.
9139
+ */
9140
+ displayClass?: number;
9141
+ }>;
9156
9142
 
9157
9143
  /**
9158
9144
  * IDs of sources and layers for traffic incidents module.