@tomtom-org/maps-sdk 0.53.0 → 0.55.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 +48 -0
- package/core/dist/core.es.js +1 -1
- package/core/dist/core.es.js.map +1 -1
- package/core/dist/index.d.ts +150 -8
- package/map/dist/index.d.ts +1381 -119
- package/map/dist/map.es.js +1 -1
- package/map/dist/map.es.js.map +1 -1
- package/map/package.json +1 -0
- package/package.json +29 -25
- package/services/dist/index.d.ts +252 -206
- package/services/dist/services.es.js +1 -1
- package/services/dist/services.es.js.map +1 -1
package/core/dist/index.d.ts
CHANGED
|
@@ -1352,6 +1352,9 @@ export type AddressRanges = {
|
|
|
1352
1352
|
* - `main`: Primary entrance (at most one per place)
|
|
1353
1353
|
* - `minor`: Secondary or alternative entrance (can have multiple)
|
|
1354
1354
|
*
|
|
1355
|
+
* Absent when the service does not classify its entry points, which is the case for
|
|
1356
|
+
* reverse geocoding.
|
|
1357
|
+
*
|
|
1355
1358
|
* @group Place
|
|
1356
1359
|
*/
|
|
1357
1360
|
export type EntryPointType = 'main' | 'minor';
|
|
@@ -1384,9 +1387,9 @@ export type EntryPoint = {
|
|
|
1384
1387
|
*/
|
|
1385
1388
|
position: Position;
|
|
1386
1389
|
/**
|
|
1387
|
-
* Type of entry point (main or minor).
|
|
1390
|
+
* Type of entry point (main or minor), when the service classifies it.
|
|
1388
1391
|
*/
|
|
1389
|
-
type
|
|
1392
|
+
type?: EntryPointType;
|
|
1390
1393
|
};
|
|
1391
1394
|
/**
|
|
1392
1395
|
* @group Place
|
|
@@ -1573,7 +1576,8 @@ export type CommonPlaceProps = {
|
|
|
1573
1576
|
/**
|
|
1574
1577
|
* Physical entry points (entrances) to the place.
|
|
1575
1578
|
*
|
|
1576
|
-
* Useful for navigation to direct users to the correct entrance.
|
|
1579
|
+
* Useful for navigation to direct users to the correct entrance. Reverse geocoding
|
|
1580
|
+
* returns them unclassified, so their `type` is absent.
|
|
1577
1581
|
*/
|
|
1578
1582
|
entryPoints?: EntryPoint[];
|
|
1579
1583
|
/**
|
|
@@ -1615,10 +1619,6 @@ export type CommonPlaceProps = {
|
|
|
1615
1619
|
* @group Place
|
|
1616
1620
|
*/
|
|
1617
1621
|
export type RevGeoAddressProps = CommonPlaceProps & {
|
|
1618
|
-
/**
|
|
1619
|
-
* Physical access points (e.g. driveway entrances) for the address, when available.
|
|
1620
|
-
*/
|
|
1621
|
-
accessPoints?: Position[];
|
|
1622
1622
|
/**
|
|
1623
1623
|
* Original coordinates used in the reverse geocoding query [longitude, latitude].
|
|
1624
1624
|
*/
|
|
@@ -2554,6 +2554,20 @@ type Maneuver = 'DEPART' | 'WAYPOINT_LEFT' | 'WAYPOINT_RIGHT' | 'WAYPOINT_REACHE
|
|
|
2554
2554
|
* @group Route
|
|
2555
2555
|
*/
|
|
2556
2556
|
type SideRoadSide = 'LEFT' | 'RIGHT' | 'LEFT_AND_RIGHT';
|
|
2557
|
+
/**
|
|
2558
|
+
* A direction relative to the vehicle's approach, used by {@link ManeuverView} to describe the
|
|
2559
|
+
* junction geometry at a maneuver.
|
|
2560
|
+
*
|
|
2561
|
+
* These are relative directions, not angles in degrees — the API reports the road layout as a
|
|
2562
|
+
* small vocabulary of bearings.
|
|
2563
|
+
* @group Route
|
|
2564
|
+
*/
|
|
2565
|
+
type ManeuverAngle = 'STRAIGHT' | 'SLIGHT_RIGHT' | 'RIGHT' | 'SHARP_RIGHT' | 'SLIGHT_LEFT' | 'LEFT' | 'SHARP_LEFT' | 'BACK';
|
|
2566
|
+
/**
|
|
2567
|
+
* The kind of roundabout a roundabout maneuver takes place on.
|
|
2568
|
+
* @group Route
|
|
2569
|
+
*/
|
|
2570
|
+
type RoundaboutType = 'REGULAR' | 'SMALL';
|
|
2557
2571
|
/**
|
|
2558
2572
|
* Available toll payment options.
|
|
2559
2573
|
* @group Route
|
|
@@ -2564,6 +2578,9 @@ type TollPaymentType = 'CASH_COINS_AND_BILLS' | 'CASH_BILLS_ONLY' | 'CASH_COINS_
|
|
|
2564
2578
|
* @group Route
|
|
2565
2579
|
*/
|
|
2566
2580
|
type RoutePathPoint = {
|
|
2581
|
+
/**
|
|
2582
|
+
* The position of this point on the route.
|
|
2583
|
+
*/
|
|
2567
2584
|
point: Position;
|
|
2568
2585
|
/**
|
|
2569
2586
|
* Distance (in meters) from the start of the route to this point.
|
|
@@ -2655,6 +2672,10 @@ type RoadInformation = {
|
|
|
2655
2672
|
* The list can be empty if no road shields are available.
|
|
2656
2673
|
*/
|
|
2657
2674
|
roadShields?: RoadShield[];
|
|
2675
|
+
/**
|
|
2676
|
+
* The code (ISO 3166-1 alpha-3) of the country this road is in.
|
|
2677
|
+
*/
|
|
2678
|
+
countryCode?: string;
|
|
2658
2679
|
};
|
|
2659
2680
|
/**
|
|
2660
2681
|
* Signpost information.
|
|
@@ -2690,6 +2711,39 @@ type SideRoad = {
|
|
|
2690
2711
|
* The offset is absolute, i.e., it is a positive integer despite that the side road is located before the maneuver on the route.
|
|
2691
2712
|
*/
|
|
2692
2713
|
offsetFromManeuverInMeters: number;
|
|
2714
|
+
/**
|
|
2715
|
+
* Whether the side road can actually be driven into.
|
|
2716
|
+
*
|
|
2717
|
+
* A non-drivable side road still matters for a junction diagram — the driver can see it — but
|
|
2718
|
+
* cannot be taken by mistake.
|
|
2719
|
+
*/
|
|
2720
|
+
isDrivable?: boolean;
|
|
2721
|
+
};
|
|
2722
|
+
/**
|
|
2723
|
+
* The layout of the junction at a maneuver: which way the route goes, and which other ways lead
|
|
2724
|
+
* off it.
|
|
2725
|
+
*
|
|
2726
|
+
* Useful for drawing a junction diagram — the route's own direction plus the roads it passes up.
|
|
2727
|
+
*
|
|
2728
|
+
* @example
|
|
2729
|
+
* ```typescript
|
|
2730
|
+
* // A right turn at a T-junction where the other arm continues straight
|
|
2731
|
+
* const view: ManeuverView = { onRouteAngle: 'RIGHT', offRouteAngles: ['STRAIGHT'] };
|
|
2732
|
+
* ```
|
|
2733
|
+
*
|
|
2734
|
+
* @group Route
|
|
2735
|
+
*/
|
|
2736
|
+
type ManeuverView = {
|
|
2737
|
+
/**
|
|
2738
|
+
* The direction the route takes through the junction.
|
|
2739
|
+
*/
|
|
2740
|
+
onRouteAngle?: ManeuverAngle;
|
|
2741
|
+
/**
|
|
2742
|
+
* The directions of the other roads at the junction, which the route does not take.
|
|
2743
|
+
*
|
|
2744
|
+
* Empty when the junction has no other arms.
|
|
2745
|
+
*/
|
|
2746
|
+
offRouteAngles: ManeuverAngle[];
|
|
2693
2747
|
};
|
|
2694
2748
|
/**
|
|
2695
2749
|
* A set of attributes describing a maneuver, e.g., "Turn right", "Keep left", "Take the ferry", "Take the motorway", "Arrive".
|
|
@@ -2713,6 +2767,13 @@ type Instruction = {
|
|
|
2713
2767
|
* A code identifying the maneuver (e.g., "Turn right").
|
|
2714
2768
|
*/
|
|
2715
2769
|
maneuver: Maneuver;
|
|
2770
|
+
/**
|
|
2771
|
+
* The ready-made, human-readable instruction text, e.g. "Turn right onto Damrak".
|
|
2772
|
+
*
|
|
2773
|
+
* Generated and localised by the routing service using the request's language, so it needs no
|
|
2774
|
+
* translation table of your own. Present on every instruction when guidance was requested.
|
|
2775
|
+
*/
|
|
2776
|
+
message?: string;
|
|
2716
2777
|
/**
|
|
2717
2778
|
* A maneuver can occupy more than one point. For such a maneuver, this field will contain a sequence of all the points it occupies on the map.
|
|
2718
2779
|
* For maneuvers that only occupy a single point, this field will contain a single array item, with a point value equal to maneuverPoint.
|
|
@@ -2836,6 +2897,16 @@ type Instruction = {
|
|
|
2836
2897
|
* ROUNDABOUT_BACK
|
|
2837
2898
|
*/
|
|
2838
2899
|
roundaboutExitNumber?: number;
|
|
2900
|
+
/**
|
|
2901
|
+
* The kind of roundabout this maneuver takes place on.
|
|
2902
|
+
* Included on roundabout maneuvers.
|
|
2903
|
+
*/
|
|
2904
|
+
roundaboutType?: RoundaboutType;
|
|
2905
|
+
/**
|
|
2906
|
+
* The layout of the junction at this maneuver — the route's own direction plus the directions
|
|
2907
|
+
* of the roads it does not take.
|
|
2908
|
+
*/
|
|
2909
|
+
maneuverView?: ManeuverView;
|
|
2839
2910
|
/**
|
|
2840
2911
|
* The name of the tollgate, if available.
|
|
2841
2912
|
* Included if the maneuver is a tollgate maneuver, i.e., maneuver is TOLLGATE.
|
|
@@ -4064,6 +4135,13 @@ export type TrafficSectionProps = SectionProps & {
|
|
|
4064
4135
|
* Extra time compared to free-flow conditions. Present when delay can be calculated.
|
|
4065
4136
|
*/
|
|
4066
4137
|
delayInSeconds?: number;
|
|
4138
|
+
/**
|
|
4139
|
+
* The identifier of the traffic incident behind this section.
|
|
4140
|
+
*
|
|
4141
|
+
* This is the join key back to the full incident: pass it to the traffic incident details
|
|
4142
|
+
* service to get the whole record, rather than re-deriving it from the section's geometry.
|
|
4143
|
+
*/
|
|
4144
|
+
eventId?: string;
|
|
4067
4145
|
};
|
|
4068
4146
|
/**
|
|
4069
4147
|
* Route section representing a leg between waypoints.
|
|
@@ -4108,6 +4186,25 @@ export type LegSectionProps = Omit<SectionProps, 'startPointIndex' | 'endPointIn
|
|
|
4108
4186
|
* Only present if the route polyline geometry is available.
|
|
4109
4187
|
*/
|
|
4110
4188
|
endPointIndex?: number;
|
|
4189
|
+
/**
|
|
4190
|
+
* Index, in the `locations` the route was requested with, of the waypoint this leg ends at.
|
|
4191
|
+
*
|
|
4192
|
+
* @remarks
|
|
4193
|
+
* A leg does not always end at the location with the same index: on an EV route the service
|
|
4194
|
+
* inserts charging stops of its own, so `legs[i]` is not reliably the leg arriving at
|
|
4195
|
+
* `locations[i + 1]`. This is the index that maps a leg back to the stop the caller passed.
|
|
4196
|
+
*
|
|
4197
|
+
* Absent on the final leg, and on legs that end somewhere the caller did not ask for — an
|
|
4198
|
+
* inserted charging stop, for instance.
|
|
4199
|
+
*
|
|
4200
|
+
* @example
|
|
4201
|
+
* ```typescript
|
|
4202
|
+
* // Which of the stops I passed does this leg arrive at?
|
|
4203
|
+
* const index = leg.originalWaypointIndex;
|
|
4204
|
+
* const stop = index === undefined ? undefined : locations[index];
|
|
4205
|
+
* ```
|
|
4206
|
+
*/
|
|
4207
|
+
originalWaypointIndex?: number;
|
|
4111
4208
|
/**
|
|
4112
4209
|
* Summary statistics for this leg.
|
|
4113
4210
|
*
|
|
@@ -4210,28 +4307,73 @@ export type RoadShieldSectionProps = SectionProps & {
|
|
|
4210
4307
|
* @group Route
|
|
4211
4308
|
*/
|
|
4212
4309
|
export type SectionsProps = {
|
|
4310
|
+
/** Stretches reserved for carpool (high-occupancy) vehicles. */
|
|
4213
4311
|
carpool?: SectionProps[];
|
|
4312
|
+
/** Stretches travelled on a car train, where the vehicle is carried by rail. */
|
|
4214
4313
|
carTrain?: SectionProps[];
|
|
4314
|
+
/** One section per country the route passes through, each naming that country. */
|
|
4215
4315
|
country?: CountrySectionProps[];
|
|
4316
|
+
/** Stretches travelled by ferry. */
|
|
4216
4317
|
ferry?: SectionProps[];
|
|
4318
|
+
/** Stretches whose street name or road numbers identify the course of the route. */
|
|
4217
4319
|
importantRoadStretch?: ImportantRoadStretchProps[];
|
|
4218
4320
|
/** Lane configuration sections. Guidance-only: present solely when `guidance` was requested. */
|
|
4219
4321
|
lanes?: LaneSectionProps[];
|
|
4322
|
+
/** One section per leg of the route. Always present: every route has at least one leg. */
|
|
4220
4323
|
leg: LegSectionProps[];
|
|
4324
|
+
/** Stretches inside a low-emission zone, which a vehicle may need to qualify to enter. */
|
|
4221
4325
|
lowEmissionZone?: SectionProps[];
|
|
4326
|
+
/** Stretches on a motorway. */
|
|
4222
4327
|
motorway?: SectionProps[];
|
|
4328
|
+
/** Stretches travelled on foot. */
|
|
4223
4329
|
pedestrian?: SectionProps[];
|
|
4330
|
+
/** Stretches carrying road shields, for rendering route numbers along the route. */
|
|
4224
4331
|
roadShields?: RoadShieldSectionProps[];
|
|
4332
|
+
/** Stretches with a known maximum speed limit. */
|
|
4225
4333
|
speedLimit?: SpeedLimitSectionProps[];
|
|
4334
|
+
/**
|
|
4335
|
+
* Stretches where a per-use road toll is charged — a ticket or barrier motorway, or a
|
|
4336
|
+
* free-flow tolling point.
|
|
4337
|
+
*
|
|
4338
|
+
* @remarks
|
|
4339
|
+
* A subset of {@link SectionsProps.tollRoad | `tollRoad`}: every stretch reported here is also
|
|
4340
|
+
* reported there. Use `toll` for "will this route cost a toll to drive", and `tollRoad` for
|
|
4341
|
+
* "does this route cost anything at all to drive" — the latter also covers vignette-only
|
|
4342
|
+
* motorways and urban charge zones, which carry no per-use toll.
|
|
4343
|
+
*
|
|
4344
|
+
* Requested with `sectionTypes: ['toll']`.
|
|
4345
|
+
*/
|
|
4226
4346
|
toll?: SectionProps[];
|
|
4347
|
+
/**
|
|
4348
|
+
* Stretches that cost money to drive, by any charging scheme: per-use tolls, motorways that
|
|
4349
|
+
* need a vignette, and urban road-charge zones.
|
|
4350
|
+
*
|
|
4351
|
+
* @remarks
|
|
4352
|
+
* A superset of {@link SectionsProps.toll | `toll`}. On a ticket motorway the two report the
|
|
4353
|
+
* same stretches; a vignette-only motorway or a city charge zone appears here and not in
|
|
4354
|
+
* `toll`.
|
|
4355
|
+
*
|
|
4356
|
+
* Included by default: leaving `sectionTypes` unset requests it, and a `sectionTypes` list has
|
|
4357
|
+
* to name `'tollRoad'` to keep it.
|
|
4358
|
+
*/
|
|
4359
|
+
tollRoad?: SectionProps[];
|
|
4360
|
+
/**
|
|
4361
|
+
* Stretches needing a vignette, one section per country requiring one.
|
|
4362
|
+
*/
|
|
4227
4363
|
tollVignette?: CountrySectionProps[];
|
|
4364
|
+
/** Stretches affected by a traffic incident, with its delay and cause. */
|
|
4228
4365
|
traffic?: TrafficSectionProps[];
|
|
4366
|
+
/** Stretches inside a tunnel. */
|
|
4229
4367
|
tunnel?: SectionProps[];
|
|
4368
|
+
/** Stretches on an unpaved road. */
|
|
4230
4369
|
unpaved?: SectionProps[];
|
|
4370
|
+
/** Stretches on urban roads. */
|
|
4231
4371
|
urban?: SectionProps[];
|
|
4372
|
+
/** Stretches the requested vehicle is not permitted to use. */
|
|
4232
4373
|
vehicleRestricted?: SectionProps[];
|
|
4233
4374
|
};
|
|
4234
4375
|
/**
|
|
4376
|
+
* The name of one route section type — a key of {@link SectionsProps}.
|
|
4235
4377
|
* @group Route
|
|
4236
4378
|
*/
|
|
4237
4379
|
export type SectionType = keyof SectionsProps;
|
|
@@ -5727,4 +5869,4 @@ export declare const mergeFromGlobal: <T extends Partial<GlobalConfig>>(givenCon
|
|
|
5727
5869
|
*/
|
|
5728
5870
|
export declare const isProxyCredentialsMode: (config?: Partial<Pick<GlobalConfig, "apiKey" | "commonBaseURL">>) => boolean;
|
|
5729
5871
|
//#endregion
|
|
5730
|
-
export type { Anything, BBox, ChargingAvailabilityDataSource, ChargingPark, ChargingParkWithAvailability, ChargingPointAvailability, ChargingStationsAvailability, CombustionSummary, ConnectorAvailability, ConnectorCount, DrivingSide, EVChargingStationWithAvailabilityPlaceProps, ElectricSummary, FeatureCollectionWithProperties, Fuel, GeometryDataSource, GetPositionEntryPointOption, GetPositionOptions, Guidance, HasBBox, HasConnector, HasCount, HasLngLat, Instruction, Landmark, Language, LegSummary, Maneuver, Moment, OpeningHours, OpeningHoursMode, OptionalBBox, POI, PathLike, PlaceDataSources, PoiDetailsDataSource, PolygonFeature, PolygonFeatures, RelatedPOI, RoadInformation, RoadInformationProperty, RoadShield, RoadShieldReference, RoutePathPoint, RoutePlanningLocation, RoutePlanningLocationType, RouteSummary, SideRoad, SideRoadSide, Signpost, SummaryBase, SummaryWithConsumption, TextWithPhonetics, TimeRange, TimeZone, TollPaymentType, TomTomAPIHeaders, TomTomHeaders, Waypoint, WaypointLike, WaypointProps, Waypoints, languages };
|
|
5872
|
+
export type { Anything, BBox, ChargingAvailabilityDataSource, ChargingPark, ChargingParkWithAvailability, ChargingPointAvailability, ChargingStationsAvailability, CombustionSummary, ConnectorAvailability, ConnectorCount, DrivingSide, EVChargingStationWithAvailabilityPlaceProps, ElectricSummary, FeatureCollectionWithProperties, Fuel, GeometryDataSource, GetPositionEntryPointOption, GetPositionOptions, Guidance, HasBBox, HasConnector, HasCount, HasLngLat, Instruction, Landmark, Language, LegSummary, Maneuver, ManeuverAngle, ManeuverView, Moment, OpeningHours, OpeningHoursMode, OptionalBBox, POI, PathLike, PlaceDataSources, PoiDetailsDataSource, PolygonFeature, PolygonFeatures, RelatedPOI, RoadInformation, RoadInformationProperty, RoadShield, RoadShieldReference, RoundaboutType, RoutePathPoint, RoutePlanningLocation, RoutePlanningLocationType, RouteSummary, SideRoad, SideRoadSide, Signpost, SummaryBase, SummaryWithConsumption, TextWithPhonetics, TimeRange, TimeZone, TollPaymentType, TomTomAPIHeaders, TomTomHeaders, Waypoint, WaypointLike, WaypointProps, Waypoints, languages };
|