@tomtom-org/maps-sdk 0.59.0 → 0.61.0
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 +431 -229
- package/README.md +2 -1
- package/core/dist/core.es.js +1 -1
- package/core/dist/core.es.js.map +1 -1
- package/core/dist/index.d.ts +51 -36
- package/core/package.json +4 -2
- package/map/dist/chunks/maplibre-gl-DJlOK9hg.js +2 -0
- package/map/dist/chunks/maplibre-gl-DJlOK9hg.js.map +1 -0
- package/map/dist/index.d.ts +2373 -1390
- package/map/dist/map.es.js +1 -1
- package/map/dist/map.es.js.map +1 -1
- package/map/package.json +19 -1
- package/package.json +8 -1
- package/services/dist/index.d.ts +817 -972
- package/services/dist/services.es.js +1 -1
- package/services/dist/services.es.js.map +1 -1
package/services/dist/index.d.ts
CHANGED
|
@@ -1,181 +1,5 @@
|
|
|
1
|
-
import { AddressProperties, AreaAnalyticsMetricKey, Avoidable, ChargingPark, ChargingParkWithAvailability, ChargingPoint, ChargingStation, ChargingStationsAccessType, ChargingStationsAvailability, ChargingStopProps, CommonPlaceProps, Connector, ConnectorType, CurrentType, EVChargingStationWithAvailabilityPlaceProps, EntryPoint, Fuel, GeographyType, GetPositionEntryPointOption, GlobalConfig, HasBBox, HasLngLat, MapcodeType, OpeningHours, OpeningHoursMode, POICategory, Place, PlaceType, Places, PlugType, PolygonFeature, PolygonFeatures, RevGeoAddressProps, RoadShieldReference, Route, RoutePlanningLocation, Routes, SearchPlaceProps, StaticChargingPoint, TimeZone, TomTomAPIHeaders, TomTomHeaders, TrafficAreaAnalytics, TrafficIncidentDetails, TrafficIncidentRequestCategory, TrafficIncidentTEC, TrafficIncidentTimeValidity, TravelMode,
|
|
1
|
+
import { AddressProperties, AreaAnalyticsMetricKey, Avoidable, ChargingPark, ChargingParkWithAvailability, ChargingPoint, ChargingStation, ChargingStationsAccessType, ChargingStationsAvailability, ChargingStopProps, CommonPlaceProps, Connector, ConnectorType, CurrentType, EVChargingStationWithAvailabilityPlaceProps, EntryPoint, Fuel, GeographyType, GeopoliticalView, GetPositionEntryPointOption, GlobalConfig, HasBBox, HasLngLat, MapcodeType, OpeningHours, OpeningHoursMode, POICategory, Place, PlaceType, Places, PlugType, PolygonFeature, PolygonFeatures, RevGeoAddressProps, RoadShieldReference, Route, RoutePlanningLocation, Routes, SearchPlaceProps, StaticChargingPoint, TimeZone, TomTomAPIHeaders, TomTomHeaders, TrafficAreaAnalytics, TrafficIncidentDetails, TrafficIncidentRequestCategory, TrafficIncidentTEC, TrafficIncidentTimeValidity, TravelMode, inputSectionTypes } from "@tomtom-org/maps-sdk/core";
|
|
2
2
|
import { ZodError, ZodIssue, ZodObject } from "zod";
|
|
3
|
-
//#region ../node_modules/.pnpm/@types+geojson@7946.0.16/node_modules/@types/geojson/index.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* The value values for the "type" property of GeoJSON Objects.
|
|
6
|
-
* https://tools.ietf.org/html/rfc7946#section-1.4
|
|
7
|
-
*/
|
|
8
|
-
type GeoJsonTypes = GeoJSON["type"];
|
|
9
|
-
/**
|
|
10
|
-
* Bounding box
|
|
11
|
-
* https://tools.ietf.org/html/rfc7946#section-5
|
|
12
|
-
*/
|
|
13
|
-
type BBox = [number, number, number, number] | [number, number, number, number, number, number];
|
|
14
|
-
/**
|
|
15
|
-
* A Position is an array of coordinates.
|
|
16
|
-
* https://tools.ietf.org/html/rfc7946#section-3.1.1
|
|
17
|
-
* Array should contain between two and three elements.
|
|
18
|
-
* The previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values),
|
|
19
|
-
* but the current specification only allows X, Y, and (optionally) Z to be defined.
|
|
20
|
-
*
|
|
21
|
-
* Note: the type will not be narrowed down to `[number, number] | [number, number, number]` due to
|
|
22
|
-
* marginal benefits and the large impact of breaking change.
|
|
23
|
-
*
|
|
24
|
-
* See previous discussions on the type narrowing:
|
|
25
|
-
* - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/pull/21590|Nov 2017}
|
|
26
|
-
* - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/67773|Dec 2023}
|
|
27
|
-
* - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/71441| Dec 2024}
|
|
28
|
-
*
|
|
29
|
-
* One can use a
|
|
30
|
-
* {@link https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates|user-defined type guard that returns a type predicate}
|
|
31
|
-
* to determine if a position is a 2D or 3D position.
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* import type { Position } from 'geojson';
|
|
35
|
-
*
|
|
36
|
-
* type StrictPosition = [x: number, y: number] | [x: number, y: number, z: number]
|
|
37
|
-
*
|
|
38
|
-
* function isStrictPosition(position: Position): position is StrictPosition {
|
|
39
|
-
* return position.length === 2 || position.length === 3
|
|
40
|
-
* };
|
|
41
|
-
*
|
|
42
|
-
* let position: Position = [-116.91, 45.54];
|
|
43
|
-
*
|
|
44
|
-
* let x: number;
|
|
45
|
-
* let y: number;
|
|
46
|
-
* let z: number | undefined;
|
|
47
|
-
*
|
|
48
|
-
* if (isStrictPosition(position)) {
|
|
49
|
-
* // `tsc` would throw an error if we tried to destructure a fourth parameter
|
|
50
|
-
* [x, y, z] = position;
|
|
51
|
-
* } else {
|
|
52
|
-
* throw new TypeError("Position is not a 2D or 3D point");
|
|
53
|
-
* }
|
|
54
|
-
*/
|
|
55
|
-
type Position = number[];
|
|
56
|
-
/**
|
|
57
|
-
* The base GeoJSON object.
|
|
58
|
-
* https://tools.ietf.org/html/rfc7946#section-3
|
|
59
|
-
* The GeoJSON specification also allows foreign members
|
|
60
|
-
* (https://tools.ietf.org/html/rfc7946#section-6.1)
|
|
61
|
-
* Developers should use "&" type in TypeScript or extend the interface
|
|
62
|
-
* to add these foreign members.
|
|
63
|
-
*/
|
|
64
|
-
interface GeoJsonObject {
|
|
65
|
-
// Don't include foreign members directly into this type def.
|
|
66
|
-
// in order to preserve type safety.
|
|
67
|
-
// [key: string]: any;
|
|
68
|
-
/**
|
|
69
|
-
* Specifies the type of GeoJSON object.
|
|
70
|
-
*/
|
|
71
|
-
type: GeoJsonTypes;
|
|
72
|
-
/**
|
|
73
|
-
* Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.
|
|
74
|
-
* The value of the bbox member is an array of length 2*n where n is the number of dimensions
|
|
75
|
-
* represented in the contained geometries, with all axes of the most southwesterly point
|
|
76
|
-
* followed by all axes of the more northeasterly point.
|
|
77
|
-
* The axes order of a bbox follows the axes order of geometries.
|
|
78
|
-
* https://tools.ietf.org/html/rfc7946#section-5
|
|
79
|
-
*/
|
|
80
|
-
bbox?: BBox | undefined;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Union of GeoJSON objects.
|
|
84
|
-
*/
|
|
85
|
-
type GeoJSON<G extends Geometry | null = Geometry, P = GeoJsonProperties> = G | Feature<G, P> | FeatureCollection<G, P>;
|
|
86
|
-
/**
|
|
87
|
-
* Geometry object.
|
|
88
|
-
* https://tools.ietf.org/html/rfc7946#section-3
|
|
89
|
-
*/
|
|
90
|
-
type Geometry = Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon | GeometryCollection;
|
|
91
|
-
/**
|
|
92
|
-
* Point geometry object.
|
|
93
|
-
* https://tools.ietf.org/html/rfc7946#section-3.1.2
|
|
94
|
-
*/
|
|
95
|
-
interface Point extends GeoJsonObject {
|
|
96
|
-
type: "Point";
|
|
97
|
-
coordinates: Position;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* MultiPoint geometry object.
|
|
101
|
-
* https://tools.ietf.org/html/rfc7946#section-3.1.3
|
|
102
|
-
*/
|
|
103
|
-
interface MultiPoint extends GeoJsonObject {
|
|
104
|
-
type: "MultiPoint";
|
|
105
|
-
coordinates: Position[];
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* LineString geometry object.
|
|
109
|
-
* https://tools.ietf.org/html/rfc7946#section-3.1.4
|
|
110
|
-
*/
|
|
111
|
-
interface LineString extends GeoJsonObject {
|
|
112
|
-
type: "LineString";
|
|
113
|
-
coordinates: Position[];
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* MultiLineString geometry object.
|
|
117
|
-
* https://tools.ietf.org/html/rfc7946#section-3.1.5
|
|
118
|
-
*/
|
|
119
|
-
interface MultiLineString extends GeoJsonObject {
|
|
120
|
-
type: "MultiLineString";
|
|
121
|
-
coordinates: Position[][];
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Polygon geometry object.
|
|
125
|
-
* https://tools.ietf.org/html/rfc7946#section-3.1.6
|
|
126
|
-
*/
|
|
127
|
-
interface Polygon extends GeoJsonObject {
|
|
128
|
-
type: "Polygon";
|
|
129
|
-
coordinates: Position[][];
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* MultiPolygon geometry object.
|
|
133
|
-
* https://tools.ietf.org/html/rfc7946#section-3.1.7
|
|
134
|
-
*/
|
|
135
|
-
interface MultiPolygon extends GeoJsonObject {
|
|
136
|
-
type: "MultiPolygon";
|
|
137
|
-
coordinates: Position[][][];
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Geometry Collection
|
|
141
|
-
* https://tools.ietf.org/html/rfc7946#section-3.1.8
|
|
142
|
-
*/
|
|
143
|
-
interface GeometryCollection<G extends Geometry = Geometry> extends GeoJsonObject {
|
|
144
|
-
type: "GeometryCollection";
|
|
145
|
-
geometries: G[];
|
|
146
|
-
}
|
|
147
|
-
type GeoJsonProperties = {
|
|
148
|
-
[name: string]: any;
|
|
149
|
-
} | null;
|
|
150
|
-
/**
|
|
151
|
-
* A feature object which contains a geometry and associated properties.
|
|
152
|
-
* https://tools.ietf.org/html/rfc7946#section-3.2
|
|
153
|
-
*/
|
|
154
|
-
interface Feature<G extends Geometry | null = Geometry, P = GeoJsonProperties> extends GeoJsonObject {
|
|
155
|
-
type: "Feature";
|
|
156
|
-
/**
|
|
157
|
-
* The feature's geometry
|
|
158
|
-
*/
|
|
159
|
-
geometry: G;
|
|
160
|
-
/**
|
|
161
|
-
* A value that uniquely identifies this feature in a
|
|
162
|
-
* https://tools.ietf.org/html/rfc7946#section-3.2.
|
|
163
|
-
*/
|
|
164
|
-
id?: string | number | undefined;
|
|
165
|
-
/**
|
|
166
|
-
* Properties associated with this feature.
|
|
167
|
-
*/
|
|
168
|
-
properties: P;
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* A collection of feature objects.
|
|
172
|
-
* https://tools.ietf.org/html/rfc7946#section-3.3
|
|
173
|
-
*/
|
|
174
|
-
interface FeatureCollection<G extends Geometry | null = Geometry, P = GeoJsonProperties> extends GeoJsonObject {
|
|
175
|
-
type: "FeatureCollection";
|
|
176
|
-
features: Array<Feature<G, P>>;
|
|
177
|
-
}
|
|
178
|
-
//#endregion
|
|
179
3
|
//#region src/shared/types/apiResponseErrorTypes.d.ts
|
|
180
4
|
/**
|
|
181
5
|
* @ignore
|
|
@@ -748,10 +572,9 @@ export type SearchIndexType = 'Geo' | 'PAD' | 'Addr' | 'Str' | 'XStr' | 'POI';
|
|
|
748
572
|
*
|
|
749
573
|
* @remarks
|
|
750
574
|
* **Applied to Services:**
|
|
751
|
-
* - {@link discoverPlaces}
|
|
575
|
+
* - {@link discoverPlaces}
|
|
752
576
|
* - {@link geocode}
|
|
753
577
|
* - {@link reverseGeocode}
|
|
754
|
-
* - {@link geometrySearch}
|
|
755
578
|
*
|
|
756
579
|
* **Key Features:**
|
|
757
580
|
* - Result limits and pagination
|
|
@@ -763,7 +586,7 @@ export type SearchIndexType = 'Geo' | 'PAD' | 'Addr' | 'Str' | 'XStr' | 'POI';
|
|
|
763
586
|
* ```typescript
|
|
764
587
|
* // Search with mapcodes and specific geopolitical view
|
|
765
588
|
* const detailedSearch: CommonPlacesParams<URL, Response> = {
|
|
766
|
-
*
|
|
589
|
+
* geopoliticalView: 'IN', // India's perspective
|
|
767
590
|
* mapcodes: ['Local', 'International'],
|
|
768
591
|
* extendedPostalCodesFor: ['PAD', 'POI'],
|
|
769
592
|
* limit: 5
|
|
@@ -864,48 +687,6 @@ export type CommonPlacesParams<ApiRequest, ApiResponse> = CommonServiceParams<Ap
|
|
|
864
687
|
* ```
|
|
865
688
|
*/
|
|
866
689
|
mapcodes?: MapcodeType[];
|
|
867
|
-
/**
|
|
868
|
-
* Geopolitical view for disputed territories.
|
|
869
|
-
*
|
|
870
|
-
* Determines how borders and place names are displayed for disputed
|
|
871
|
-
* territories, according to different countries' perspectives.
|
|
872
|
-
*
|
|
873
|
-
* @remarks
|
|
874
|
-
* **Available Views:**
|
|
875
|
-
* - `Unified`: International/neutral view (default)
|
|
876
|
-
* - `AR`: Argentina's perspective
|
|
877
|
-
* - `IN`: India's perspective
|
|
878
|
-
* - `PK`: Pakistan's perspective
|
|
879
|
-
* - `IL`: Israel's perspective
|
|
880
|
-
* - `MA`: Morocco's perspective
|
|
881
|
-
* - `RU`: Russia's perspective
|
|
882
|
-
* - `TR`: Turkey's perspective
|
|
883
|
-
* - `CN`: China's perspective
|
|
884
|
-
* - `TW`: Taiwan's perspective
|
|
885
|
-
* - `RS`: Serbia's perspective
|
|
886
|
-
*
|
|
887
|
-
* `MA` is accepted by this type but is not supported by the current backend.
|
|
888
|
-
*
|
|
889
|
-
* **Affected Elements:**
|
|
890
|
-
* - Border lines on maps
|
|
891
|
-
* - Territory names
|
|
892
|
-
* - Administrative classifications
|
|
893
|
-
* - Place name spellings
|
|
894
|
-
*
|
|
895
|
-
* **Legal Compliance:**
|
|
896
|
-
* Use appropriate views based on your target audience and
|
|
897
|
-
* legal requirements in different regions.
|
|
898
|
-
*
|
|
899
|
-
* @default 'Unified'
|
|
900
|
-
*
|
|
901
|
-
* @example
|
|
902
|
-
* ```typescript
|
|
903
|
-
* view: 'Unified' // Neutral international view
|
|
904
|
-
* view: 'IN' // India's perspective
|
|
905
|
-
* view: 'CN' // China's perspective
|
|
906
|
-
* ```
|
|
907
|
-
*/
|
|
908
|
-
view?: View;
|
|
909
690
|
};
|
|
910
691
|
//#endregion
|
|
911
692
|
//#region src/shared/types/searchFilters.d.ts
|
|
@@ -976,7 +757,7 @@ export type SearchFilters = PlaceFilters & GeographicFilters;
|
|
|
976
757
|
*
|
|
977
758
|
* @remarks
|
|
978
759
|
* Used by:
|
|
979
|
-
* - {@link
|
|
760
|
+
* - {@link discoverPlaces}
|
|
980
761
|
* - {@link geocode}
|
|
981
762
|
*
|
|
982
763
|
* @group Places Search
|
|
@@ -1248,6 +1029,8 @@ type ChargingModel = {
|
|
|
1248
1029
|
* Must contain from zero to up to 20 (inclusive) json objects describing a battery point,
|
|
1249
1030
|
* each containing stateOfChargeInkWh and maxPowerInkW.
|
|
1250
1031
|
*
|
|
1032
|
+
* Required for a route with charging stops (`preferences.chargingPreferences`): the service rejects one without it.
|
|
1033
|
+
*
|
|
1251
1034
|
* None of the stateOfChargeInkWh values from such an object may equal any other stateOfChargeInkWh of an object.
|
|
1252
1035
|
* maxPowerInkW must be larger than zero.
|
|
1253
1036
|
*/
|
|
@@ -2214,7 +1997,7 @@ export type ElectricVehicleParams = {
|
|
|
2214
1997
|
* @remarks
|
|
2215
1998
|
* Should include battery capacity, charging curve, and consumption profiles. A predefined
|
|
2216
1999
|
* `variantId` is accepted here, but only `calculateRoute` with charging preferences understands
|
|
2217
|
-
* one — a range
|
|
2000
|
+
* one — a range has no charging stops to plan for.
|
|
2218
2001
|
*/
|
|
2219
2002
|
model?: VehicleModel<'electric'>;
|
|
2220
2003
|
/**
|
|
@@ -2597,8 +2380,8 @@ export type DepartArriveParams<Option extends DepartArriveOption = DepartArriveO
|
|
|
2597
2380
|
* They provide a consistent interface across different routing services.
|
|
2598
2381
|
*
|
|
2599
2382
|
* @remarks
|
|
2600
|
-
*
|
|
2601
|
-
*
|
|
2383
|
+
* Both routing services (calculateRoute, calculateReachableRange) accept these parameters
|
|
2384
|
+
* to customize route calculation. They control:
|
|
2602
2385
|
* - What to optimize for (time, distance, fuel)
|
|
2603
2386
|
* - Vehicle constraints and capabilities
|
|
2604
2387
|
* - When to travel (affecting traffic)
|
|
@@ -2607,7 +2390,6 @@ export type DepartArriveParams<Option extends DepartArriveOption = DepartArriveO
|
|
|
2607
2390
|
*
|
|
2608
2391
|
* **Service Compatibility:**
|
|
2609
2392
|
* - {@link calculateRoute}: All parameters supported
|
|
2610
|
-
* - {@link calculateMatrixRoute}: Subset of parameters
|
|
2611
2393
|
* - {@link calculateReachableRange}: Subset of parameters
|
|
2612
2394
|
*
|
|
2613
2395
|
* @example
|
|
@@ -2770,10 +2552,7 @@ export type TimeZoneRequest = 'iana';
|
|
|
2770
2552
|
* @typeParam ApiResponse - The API response type
|
|
2771
2553
|
*
|
|
2772
2554
|
* @remarks
|
|
2773
|
-
* Used by
|
|
2774
|
-
* - {@link discoverPlaces}
|
|
2775
|
-
* - {@link fuzzySearch}
|
|
2776
|
-
* - {@link geometrySearch}
|
|
2555
|
+
* Used by {@link discoverPlaces}.
|
|
2777
2556
|
*
|
|
2778
2557
|
* Provides:
|
|
2779
2558
|
* - POI category, brand, EV charging and fuel type filters (`filters`)
|
|
@@ -2895,57 +2674,231 @@ export type CommonSearchParams<ApiRequest, ApiResponse> = CommonPlacesParams<Api
|
|
|
2895
2674
|
relatedPois?: RelatedPoisRequest;
|
|
2896
2675
|
};
|
|
2897
2676
|
//#endregion
|
|
2898
|
-
//#region
|
|
2677
|
+
//#region ../node_modules/.pnpm/@types+geojson@7946.0.16/node_modules/@types/geojson/index.d.ts
|
|
2899
2678
|
/**
|
|
2900
|
-
*
|
|
2901
|
-
*
|
|
2902
|
-
* Indicates whether the search was location-based or general.
|
|
2903
|
-
*
|
|
2904
|
-
* @remarks
|
|
2905
|
-
* - `NEARBY`: Results are based on proximity to a specified location (uses `at` parameter)
|
|
2906
|
-
* - `NON_NEAR`: General search without location bias, or results span a wide area
|
|
2907
|
-
*
|
|
2908
|
-
* @group Places Search
|
|
2679
|
+
* The value values for the "type" property of GeoJSON Objects.
|
|
2680
|
+
* https://tools.ietf.org/html/rfc7946#section-1.4
|
|
2909
2681
|
*/
|
|
2910
|
-
type
|
|
2682
|
+
type GeoJsonTypes = GeoJSON["type"];
|
|
2911
2683
|
/**
|
|
2912
|
-
*
|
|
2684
|
+
* Bounding box
|
|
2685
|
+
* https://tools.ietf.org/html/rfc7946#section-5
|
|
2686
|
+
*/
|
|
2687
|
+
type BBox = [number, number, number, number] | [number, number, number, number, number, number];
|
|
2688
|
+
/**
|
|
2689
|
+
* A Position is an array of coordinates.
|
|
2690
|
+
* https://tools.ietf.org/html/rfc7946#section-3.1.1
|
|
2691
|
+
* Array should contain between two and three elements.
|
|
2692
|
+
* The previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values),
|
|
2693
|
+
* but the current specification only allows X, Y, and (optionally) Z to be defined.
|
|
2913
2694
|
*
|
|
2914
|
-
*
|
|
2915
|
-
*
|
|
2916
|
-
* through results.
|
|
2695
|
+
* Note: the type will not be narrowed down to `[number, number] | [number, number, number]` due to
|
|
2696
|
+
* marginal benefits and the large impact of breaking change.
|
|
2917
2697
|
*
|
|
2918
|
-
*
|
|
2919
|
-
*
|
|
2920
|
-
* - {@link
|
|
2921
|
-
* - {@link
|
|
2922
|
-
*
|
|
2923
|
-
*
|
|
2698
|
+
* See previous discussions on the type narrowing:
|
|
2699
|
+
* - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/pull/21590|Nov 2017}
|
|
2700
|
+
* - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/67773|Dec 2023}
|
|
2701
|
+
* - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/71441| Dec 2024}
|
|
2702
|
+
*
|
|
2703
|
+
* One can use a
|
|
2704
|
+
* {@link https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates|user-defined type guard that returns a type predicate}
|
|
2705
|
+
* to determine if a position is a 2D or 3D position.
|
|
2924
2706
|
*
|
|
2925
2707
|
* @example
|
|
2926
|
-
*
|
|
2927
|
-
* const results = await discoverPlaces({
|
|
2928
|
-
* query: 'pizza',
|
|
2929
|
-
* geoBias: { position: [4.9, 52.3] }
|
|
2930
|
-
* });
|
|
2708
|
+
* import type { Position } from 'geojson';
|
|
2931
2709
|
*
|
|
2932
|
-
*
|
|
2933
|
-
* console.log(`Found ${summary?.totalResults ?? 'an unknown number of'} total results`);
|
|
2934
|
-
* console.log(`Showing ${summary?.numResults} results`);
|
|
2935
|
-
* console.log(`Query type: ${summary?.queryType}`); // 'NEARBY'
|
|
2936
|
-
* console.log(`Search took ${summary?.queryTime}ms`);
|
|
2937
|
-
* ```
|
|
2710
|
+
* type StrictPosition = [x: number, y: number] | [x: number, y: number, z: number]
|
|
2938
2711
|
*
|
|
2939
|
-
*
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2712
|
+
* function isStrictPosition(position: Position): position is StrictPosition {
|
|
2713
|
+
* return position.length === 2 || position.length === 3
|
|
2714
|
+
* };
|
|
2715
|
+
*
|
|
2716
|
+
* let position: Position = [-116.91, 45.54];
|
|
2717
|
+
*
|
|
2718
|
+
* let x: number;
|
|
2719
|
+
* let y: number;
|
|
2720
|
+
* let z: number | undefined;
|
|
2721
|
+
*
|
|
2722
|
+
* if (isStrictPosition(position)) {
|
|
2723
|
+
* // `tsc` would throw an error if we tried to destructure a fourth parameter
|
|
2724
|
+
* [x, y, z] = position;
|
|
2725
|
+
* } else {
|
|
2726
|
+
* throw new TypeError("Position is not a 2D or 3D point");
|
|
2727
|
+
* }
|
|
2728
|
+
*/
|
|
2729
|
+
type Position = number[];
|
|
2730
|
+
/**
|
|
2731
|
+
* The base GeoJSON object.
|
|
2732
|
+
* https://tools.ietf.org/html/rfc7946#section-3
|
|
2733
|
+
* The GeoJSON specification also allows foreign members
|
|
2734
|
+
* (https://tools.ietf.org/html/rfc7946#section-6.1)
|
|
2735
|
+
* Developers should use "&" type in TypeScript or extend the interface
|
|
2736
|
+
* to add these foreign members.
|
|
2737
|
+
*/
|
|
2738
|
+
interface GeoJsonObject {
|
|
2739
|
+
// Don't include foreign members directly into this type def.
|
|
2740
|
+
// in order to preserve type safety.
|
|
2741
|
+
// [key: string]: any;
|
|
2742
|
+
/**
|
|
2743
|
+
* Specifies the type of GeoJSON object.
|
|
2744
|
+
*/
|
|
2745
|
+
type: GeoJsonTypes;
|
|
2746
|
+
/**
|
|
2747
|
+
* Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.
|
|
2748
|
+
* The value of the bbox member is an array of length 2*n where n is the number of dimensions
|
|
2749
|
+
* represented in the contained geometries, with all axes of the most southwesterly point
|
|
2750
|
+
* followed by all axes of the more northeasterly point.
|
|
2751
|
+
* The axes order of a bbox follows the axes order of geometries.
|
|
2752
|
+
* https://tools.ietf.org/html/rfc7946#section-5
|
|
2753
|
+
*/
|
|
2754
|
+
bbox?: BBox | undefined;
|
|
2755
|
+
}
|
|
2756
|
+
/**
|
|
2757
|
+
* Union of GeoJSON objects.
|
|
2758
|
+
*/
|
|
2759
|
+
type GeoJSON<G extends Geometry | null = Geometry, P = GeoJsonProperties> = G | Feature<G, P> | FeatureCollection<G, P>;
|
|
2760
|
+
/**
|
|
2761
|
+
* Geometry object.
|
|
2762
|
+
* https://tools.ietf.org/html/rfc7946#section-3
|
|
2763
|
+
*/
|
|
2764
|
+
type Geometry = Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon | GeometryCollection;
|
|
2765
|
+
/**
|
|
2766
|
+
* Point geometry object.
|
|
2767
|
+
* https://tools.ietf.org/html/rfc7946#section-3.1.2
|
|
2768
|
+
*/
|
|
2769
|
+
interface Point extends GeoJsonObject {
|
|
2770
|
+
type: "Point";
|
|
2771
|
+
coordinates: Position;
|
|
2772
|
+
}
|
|
2773
|
+
/**
|
|
2774
|
+
* MultiPoint geometry object.
|
|
2775
|
+
* https://tools.ietf.org/html/rfc7946#section-3.1.3
|
|
2776
|
+
*/
|
|
2777
|
+
interface MultiPoint extends GeoJsonObject {
|
|
2778
|
+
type: "MultiPoint";
|
|
2779
|
+
coordinates: Position[];
|
|
2780
|
+
}
|
|
2781
|
+
/**
|
|
2782
|
+
* LineString geometry object.
|
|
2783
|
+
* https://tools.ietf.org/html/rfc7946#section-3.1.4
|
|
2784
|
+
*/
|
|
2785
|
+
interface LineString extends GeoJsonObject {
|
|
2786
|
+
type: "LineString";
|
|
2787
|
+
coordinates: Position[];
|
|
2788
|
+
}
|
|
2789
|
+
/**
|
|
2790
|
+
* MultiLineString geometry object.
|
|
2791
|
+
* https://tools.ietf.org/html/rfc7946#section-3.1.5
|
|
2792
|
+
*/
|
|
2793
|
+
interface MultiLineString extends GeoJsonObject {
|
|
2794
|
+
type: "MultiLineString";
|
|
2795
|
+
coordinates: Position[][];
|
|
2796
|
+
}
|
|
2797
|
+
/**
|
|
2798
|
+
* Polygon geometry object.
|
|
2799
|
+
* https://tools.ietf.org/html/rfc7946#section-3.1.6
|
|
2800
|
+
*/
|
|
2801
|
+
interface Polygon extends GeoJsonObject {
|
|
2802
|
+
type: "Polygon";
|
|
2803
|
+
coordinates: Position[][];
|
|
2804
|
+
}
|
|
2805
|
+
/**
|
|
2806
|
+
* MultiPolygon geometry object.
|
|
2807
|
+
* https://tools.ietf.org/html/rfc7946#section-3.1.7
|
|
2808
|
+
*/
|
|
2809
|
+
interface MultiPolygon extends GeoJsonObject {
|
|
2810
|
+
type: "MultiPolygon";
|
|
2811
|
+
coordinates: Position[][][];
|
|
2812
|
+
}
|
|
2813
|
+
/**
|
|
2814
|
+
* Geometry Collection
|
|
2815
|
+
* https://tools.ietf.org/html/rfc7946#section-3.1.8
|
|
2816
|
+
*/
|
|
2817
|
+
interface GeometryCollection<G extends Geometry = Geometry> extends GeoJsonObject {
|
|
2818
|
+
type: "GeometryCollection";
|
|
2819
|
+
geometries: G[];
|
|
2820
|
+
}
|
|
2821
|
+
type GeoJsonProperties = {
|
|
2822
|
+
[name: string]: any;
|
|
2823
|
+
} | null;
|
|
2824
|
+
/**
|
|
2825
|
+
* A feature object which contains a geometry and associated properties.
|
|
2826
|
+
* https://tools.ietf.org/html/rfc7946#section-3.2
|
|
2827
|
+
*/
|
|
2828
|
+
interface Feature<G extends Geometry | null = Geometry, P = GeoJsonProperties> extends GeoJsonObject {
|
|
2829
|
+
type: "Feature";
|
|
2830
|
+
/**
|
|
2831
|
+
* The feature's geometry
|
|
2832
|
+
*/
|
|
2833
|
+
geometry: G;
|
|
2834
|
+
/**
|
|
2835
|
+
* A value that uniquely identifies this feature in a
|
|
2836
|
+
* https://tools.ietf.org/html/rfc7946#section-3.2.
|
|
2837
|
+
*/
|
|
2838
|
+
id?: string | number | undefined;
|
|
2839
|
+
/**
|
|
2840
|
+
* Properties associated with this feature.
|
|
2841
|
+
*/
|
|
2842
|
+
properties: P;
|
|
2843
|
+
}
|
|
2844
|
+
/**
|
|
2845
|
+
* A collection of feature objects.
|
|
2846
|
+
* https://tools.ietf.org/html/rfc7946#section-3.3
|
|
2847
|
+
*/
|
|
2848
|
+
interface FeatureCollection<G extends Geometry | null = Geometry, P = GeoJsonProperties> extends GeoJsonObject {
|
|
2849
|
+
type: "FeatureCollection";
|
|
2850
|
+
features: Array<Feature<G, P>>;
|
|
2851
|
+
}
|
|
2852
|
+
//#endregion
|
|
2853
|
+
//#region src/shared/types/searchSummary.d.ts
|
|
2854
|
+
/**
|
|
2855
|
+
* Query type classification for search results.
|
|
2856
|
+
*
|
|
2857
|
+
* Indicates whether the search was location-based or general.
|
|
2858
|
+
*
|
|
2859
|
+
* @remarks
|
|
2860
|
+
* - `NEARBY`: Results are based on proximity to a specified location (uses `at` parameter)
|
|
2861
|
+
* - `NON_NEAR`: General search without location bias, or results span a wide area
|
|
2862
|
+
*
|
|
2863
|
+
* @group Places Search
|
|
2864
|
+
*/
|
|
2865
|
+
type SummaryQueryType = 'NEARBY' | 'NON_NEAR';
|
|
2866
|
+
/**
|
|
2867
|
+
* Metadata summary for search API responses.
|
|
2868
|
+
*
|
|
2869
|
+
* Provides information about the search query execution, result counts, and the cursor that
|
|
2870
|
+
* continues the search. This metadata helps understand how the search was processed and page
|
|
2871
|
+
* through results.
|
|
2872
|
+
*
|
|
2873
|
+
* @remarks
|
|
2874
|
+
* This summary is included in responses from:
|
|
2875
|
+
* - {@link discoverPlaces}
|
|
2876
|
+
* - {@link geocode}
|
|
2877
|
+
*
|
|
2878
|
+
* @example
|
|
2879
|
+
* ```typescript
|
|
2880
|
+
* const results = await discoverPlaces({
|
|
2881
|
+
* query: 'pizza',
|
|
2882
|
+
* geoBias: { position: [4.9, 52.3] }
|
|
2883
|
+
* });
|
|
2884
|
+
*
|
|
2885
|
+
* const summary = results.properties;
|
|
2886
|
+
* console.log(`Found ${summary?.totalResults ?? 'an unknown number of'} total results`);
|
|
2887
|
+
* console.log(`Showing ${summary?.numResults} results`);
|
|
2888
|
+
* console.log(`Query type: ${summary?.queryType}`); // 'NEARBY'
|
|
2889
|
+
* console.log(`Search took ${summary?.queryTime}ms`);
|
|
2890
|
+
* ```
|
|
2891
|
+
*
|
|
2892
|
+
* @group Places Search
|
|
2893
|
+
*/
|
|
2894
|
+
export type SearchSummary = {
|
|
2895
|
+
/**
|
|
2896
|
+
* The search query as interpreted and processed by the search engine.
|
|
2897
|
+
*
|
|
2898
|
+
* May differ from the original input due to:
|
|
2899
|
+
* - Normalization (case, spacing, diacritics)
|
|
2900
|
+
* - Spelling corrections
|
|
2901
|
+
* - Query expansion
|
|
2949
2902
|
* - Stop word removal
|
|
2950
2903
|
*
|
|
2951
2904
|
* @example
|
|
@@ -3074,28 +3027,6 @@ export type SearchSummary = {
|
|
|
3074
3027
|
geoBias?: Position;
|
|
3075
3028
|
};
|
|
3076
3029
|
//#endregion
|
|
3077
|
-
//#region src/along-route-search/types/alongRouteSearchRequestAPI.d.ts
|
|
3078
|
-
/**
|
|
3079
|
-
* @ignore
|
|
3080
|
-
*/
|
|
3081
|
-
type RoutePointAPI = {
|
|
3082
|
-
lat: number;
|
|
3083
|
-
lon: number;
|
|
3084
|
-
};
|
|
3085
|
-
/**
|
|
3086
|
-
* @ignore
|
|
3087
|
-
*/
|
|
3088
|
-
type AlongRouteSearchPayloadAPI = {
|
|
3089
|
-
route: {
|
|
3090
|
-
points: RoutePointAPI[];
|
|
3091
|
-
};
|
|
3092
|
-
};
|
|
3093
|
-
/**
|
|
3094
|
-
* Along-route search request type.
|
|
3095
|
-
* @ignore
|
|
3096
|
-
*/
|
|
3097
|
-
type AlongRouteSearchRequestAPI = PostObject<AlongRouteSearchPayloadAPI>;
|
|
3098
|
-
//#endregion
|
|
3099
3030
|
//#region src/shared/types/apiPlacesResponseTypes.d.ts
|
|
3100
3031
|
/**
|
|
3101
3032
|
* @ignore
|
|
@@ -3270,228 +3201,50 @@ type CommonSearchPlaceResultAPI = Omit<SearchPlaceProps, 'distance' | 'position'
|
|
|
3270
3201
|
chargingStations?: ChargingStationAPI[];
|
|
3271
3202
|
};
|
|
3272
3203
|
//#endregion
|
|
3273
|
-
//#region src/
|
|
3204
|
+
//#region src/ev-charging-stations-availability/types/apiTypes.d.ts
|
|
3274
3205
|
/**
|
|
3275
3206
|
* @ignore
|
|
3276
3207
|
*/
|
|
3277
|
-
type
|
|
3208
|
+
type EVChargingStationResultAPI = {
|
|
3209
|
+
id: string;
|
|
3210
|
+
name: string;
|
|
3211
|
+
position: LatLonAPI;
|
|
3212
|
+
openingHours: OpeningHoursAPI;
|
|
3213
|
+
timeZone: TimeZone;
|
|
3214
|
+
accessType: ChargingStationsAccessType;
|
|
3215
|
+
chargingStations: ChargingStationAPI<Pick<ChargingPoint, 'status'>>[];
|
|
3216
|
+
};
|
|
3278
3217
|
/**
|
|
3279
3218
|
* @ignore
|
|
3280
3219
|
*/
|
|
3281
|
-
type
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
*/
|
|
3289
|
-
results: AlongRouteSearchResultAPI[];
|
|
3220
|
+
type ChargingStationsAvailabilityResponseAPI = {
|
|
3221
|
+
summary: {
|
|
3222
|
+
numResults: number;
|
|
3223
|
+
offset: number;
|
|
3224
|
+
totalResults: number;
|
|
3225
|
+
};
|
|
3226
|
+
results?: EVChargingStationResultAPI[];
|
|
3290
3227
|
};
|
|
3291
3228
|
//#endregion
|
|
3292
|
-
//#region src/
|
|
3229
|
+
//#region src/ev-charging-stations-availability/types/evChargingStationsAvailabilityParams.d.ts
|
|
3293
3230
|
/**
|
|
3294
|
-
*
|
|
3231
|
+
* Parameters for the EV Charging Stations Availability service.
|
|
3295
3232
|
*
|
|
3296
|
-
*
|
|
3233
|
+
* Fetches real-time availability status of charging points at an EV charging park.
|
|
3297
3234
|
*
|
|
3298
3235
|
* @remarks
|
|
3299
|
-
*
|
|
3300
|
-
*
|
|
3301
|
-
*
|
|
3302
|
-
*
|
|
3303
|
-
* -
|
|
3304
|
-
* -
|
|
3305
|
-
*
|
|
3306
|
-
* @group Along Route Search
|
|
3307
|
-
*/
|
|
3308
|
-
type AlongRouteSortBy = 'detourTime' | 'detourOffset';
|
|
3309
|
-
/**
|
|
3310
|
-
* Parameters for searching places along a route.
|
|
3311
|
-
*
|
|
3312
|
-
* Along-route search finds POIs near a provided route geometry and ranks them
|
|
3313
|
-
* by the detour cost (time or distance offset) required to visit them.
|
|
3314
|
-
*
|
|
3315
|
-
* @remarks
|
|
3316
|
-
* **Key Features:**
|
|
3317
|
-
* - Search for POIs within a detour budget from the route
|
|
3318
|
-
* - Sort results by detour time or route offset
|
|
3319
|
-
* - Combine with POI category and brand filters
|
|
3320
|
-
* - Use directly with a {@link calculateRoute} result
|
|
3321
|
-
*
|
|
3322
|
-
* **Use Cases:**
|
|
3323
|
-
* - Find fuel stations or EV chargers along a trip
|
|
3324
|
-
* - Locate rest stops or restaurants near a route
|
|
3325
|
-
* - Surface services reachable within a time budget
|
|
3326
|
-
*
|
|
3327
|
-
* @example
|
|
3328
|
-
* ```typescript
|
|
3329
|
-
* // Find coffee shops within a 5-minute detour from a route
|
|
3330
|
-
* const results = await discoverPlaces({
|
|
3331
|
-
* route: routeResult.features[0],
|
|
3332
|
-
* maxDetourTimeSeconds: 300,
|
|
3333
|
-
* query: 'coffee',
|
|
3334
|
-
* });
|
|
3335
|
-
*
|
|
3336
|
-
* // Find EV charging stations using a plain coordinate array
|
|
3337
|
-
* const chargers = await discoverPlaces({
|
|
3338
|
-
* route: [[4.9, 52.37], [4.95, 52.28], [5.1, 52.09]],
|
|
3339
|
-
* maxDetourTimeSeconds: 600,
|
|
3340
|
-
* filters: { poiCategories: ['CHARGING_LOCATION'] },
|
|
3341
|
-
* sortBy: 'detourOffset',
|
|
3342
|
-
* });
|
|
3343
|
-
* ```
|
|
3344
|
-
*
|
|
3345
|
-
* @group Along Route Search
|
|
3346
|
-
*/
|
|
3347
|
-
type AlongRouteSearchParams = CommonSearchParams<AlongRouteSearchRequestAPI, AlongRouteSearchResponseAPI> & {
|
|
3348
|
-
/**
|
|
3349
|
-
* Route geometry to search along.
|
|
3350
|
-
*
|
|
3351
|
-
* Accepts any of three forms:
|
|
3352
|
-
* - **`Route`** feature as returned by {@link calculateRoute} (most common)
|
|
3353
|
-
* - **`LineString`** GeoJSON geometry object
|
|
3354
|
-
* - **`Position[]`** — a plain array of `[longitude, latitude]` coordinate pairs
|
|
3355
|
-
*
|
|
3356
|
-
* Coordinates must always be in `[longitude, latitude]` order.
|
|
3357
|
-
*
|
|
3358
|
-
* @example
|
|
3359
|
-
* ```typescript
|
|
3360
|
-
* // Route Feature from calculateRoute (most common)
|
|
3361
|
-
* route: routeResult.features[0]
|
|
3362
|
-
*
|
|
3363
|
-
* // GeoJSON LineString geometry
|
|
3364
|
-
* route: routeResult.features[0].geometry
|
|
3365
|
-
*
|
|
3366
|
-
* // Plain coordinate array
|
|
3367
|
-
* route: [[4.9, 52.37], [4.95, 52.28], [5.1, 52.09]]
|
|
3368
|
-
* ```
|
|
3369
|
-
*/
|
|
3370
|
-
route: LineString | Route | Position[];
|
|
3371
|
-
/**
|
|
3372
|
-
* Maximum allowed detour time in seconds.
|
|
3373
|
-
*
|
|
3374
|
-
* Only POIs reachable within this additional travel time from the route
|
|
3375
|
-
* will be returned. Controls the width of the search corridor.
|
|
3376
|
-
*
|
|
3377
|
-
* @example
|
|
3378
|
-
* ```typescript
|
|
3379
|
-
* maxDetourTimeSeconds: 300 // 5-minute detour budget
|
|
3380
|
-
* ```
|
|
3381
|
-
*/
|
|
3382
|
-
maxDetourTimeSeconds: number;
|
|
3383
|
-
/**
|
|
3384
|
-
* Sort order for the results.
|
|
3385
|
-
*
|
|
3386
|
-
* @default 'detourTime'
|
|
3387
|
-
*
|
|
3388
|
-
* @example
|
|
3389
|
-
* ```typescript
|
|
3390
|
-
* sortBy: 'detourOffset' // order by position along the route
|
|
3391
|
-
* ```
|
|
3392
|
-
*/
|
|
3393
|
-
sortBy?: AlongRouteSortBy;
|
|
3394
|
-
};
|
|
3395
|
-
//#endregion
|
|
3396
|
-
//#region src/along-route-search/types/alongRouteSearchResponse.d.ts
|
|
3397
|
-
/**
|
|
3398
|
-
* Response from an along-route search query.
|
|
3399
|
-
*
|
|
3400
|
-
* Contains places found near the route, sorted by detour time or offset,
|
|
3401
|
-
* along with summary information about the search results.
|
|
3402
|
-
*
|
|
3403
|
-
* @group Along Route Search
|
|
3404
|
-
*/
|
|
3405
|
-
type AlongRouteSearchResponse = Places<SearchPlaceProps, SearchSummary>;
|
|
3406
|
-
//#endregion
|
|
3407
|
-
//#region src/along-route-search/alongRouteSearch.d.ts
|
|
3408
|
-
/**
|
|
3409
|
-
* Search for places along a route, ranked by detour cost.
|
|
3410
|
-
*
|
|
3411
|
-
* Returns POIs reachable within a given detour budget from the provided route geometry.
|
|
3412
|
-
* Results are sorted by detour time (or offset along the route) so the most
|
|
3413
|
-
* accessible stops appear first.
|
|
3414
|
-
*
|
|
3415
|
-
* @remarks
|
|
3416
|
-
* This service is ideal for trip planning use cases:
|
|
3417
|
-
* - Find fuel or EV charging stations along the way
|
|
3418
|
-
* - Locate food stops or rest areas near the route
|
|
3419
|
-
* - Surface services reachable within a time budget
|
|
3420
|
-
*
|
|
3421
|
-
* The `route` is typically sourced from a {@link calculateRoute} result.
|
|
3422
|
-
*
|
|
3423
|
-
* @param params Along-route search parameters including the route geometry and detour budget
|
|
3424
|
-
*
|
|
3425
|
-
* @returns Promise resolving to a collection of matching places sorted by detour cost
|
|
3426
|
-
*
|
|
3427
|
-
* @example
|
|
3428
|
-
* ```typescript
|
|
3429
|
-
* // Find coffee shops within a 5-minute detour
|
|
3430
|
-
* const results = await alongRouteSearch({
|
|
3431
|
-
* route: routeResult.features[0].geometry,
|
|
3432
|
-
* maxDetourTimeSeconds: 300,
|
|
3433
|
-
* query: 'coffee',
|
|
3434
|
-
* });
|
|
3435
|
-
*
|
|
3436
|
-
* // EV chargers with a 10-minute budget, sorted by position on route
|
|
3437
|
-
* const chargers = await alongRouteSearch({
|
|
3438
|
-
* route: routeResult.features[0].geometry,
|
|
3439
|
-
* maxDetourTimeSeconds: 600,
|
|
3440
|
-
* filters: { poiCategories: ['CHARGING_LOCATION'] },
|
|
3441
|
-
* sortBy: 'detourOffset',
|
|
3442
|
-
* });
|
|
3443
|
-
* ```
|
|
3444
|
-
*
|
|
3445
|
-
* @see [Along Route Search API Documentation](https://docs.tomtom.com/search-api/documentation/tomtom-orbis-maps/search-service/along-route-search)
|
|
3446
|
-
*
|
|
3447
|
-
* @ignore (exposed via 'search')
|
|
3448
|
-
*/
|
|
3449
|
-
export declare const alongRouteSearch: (params: AlongRouteSearchParams) => Promise<AlongRouteSearchResponse>;
|
|
3450
|
-
//#endregion
|
|
3451
|
-
//#region src/ev-charging-stations-availability/types/apiTypes.d.ts
|
|
3452
|
-
/**
|
|
3453
|
-
* @ignore
|
|
3454
|
-
*/
|
|
3455
|
-
type EVChargingStationResultAPI = {
|
|
3456
|
-
id: string;
|
|
3457
|
-
name: string;
|
|
3458
|
-
position: LatLonAPI;
|
|
3459
|
-
openingHours: OpeningHoursAPI;
|
|
3460
|
-
timeZone: TimeZone;
|
|
3461
|
-
accessType: ChargingStationsAccessType;
|
|
3462
|
-
chargingStations: ChargingStationAPI<Pick<ChargingPoint, 'status'>>[];
|
|
3463
|
-
};
|
|
3464
|
-
/**
|
|
3465
|
-
* @ignore
|
|
3466
|
-
*/
|
|
3467
|
-
type ChargingStationsAvailabilityResponseAPI = {
|
|
3468
|
-
summary: {
|
|
3469
|
-
numResults: number;
|
|
3470
|
-
offset: number;
|
|
3471
|
-
totalResults: number;
|
|
3472
|
-
};
|
|
3473
|
-
results?: EVChargingStationResultAPI[];
|
|
3474
|
-
};
|
|
3475
|
-
//#endregion
|
|
3476
|
-
//#region src/ev-charging-stations-availability/types/evChargingStationsAvailabilityParams.d.ts
|
|
3477
|
-
/**
|
|
3478
|
-
* Parameters for the EV Charging Stations Availability service.
|
|
3479
|
-
*
|
|
3480
|
-
* Fetches real-time availability status of charging points at an EV charging park.
|
|
3481
|
-
*
|
|
3482
|
-
* @remarks
|
|
3483
|
-
* **Key Information Returned:**
|
|
3484
|
-
* - Charging point availability status (Available, Occupied, Reserved, Out of Service)
|
|
3485
|
-
* - Connector details (power ratings, plug types)
|
|
3486
|
-
* - Aggregated availability counts
|
|
3487
|
-
* - Access restrictions
|
|
3488
|
-
* - Opening hours
|
|
3236
|
+
* **Key Information Returned:**
|
|
3237
|
+
* - Charging point availability status (Available, Occupied, Reserved, Out of Service)
|
|
3238
|
+
* - Connector details (power ratings, plug types)
|
|
3239
|
+
* - Aggregated availability counts
|
|
3240
|
+
* - Access restrictions
|
|
3241
|
+
* - Opening hours
|
|
3489
3242
|
*
|
|
3490
3243
|
* @example
|
|
3491
3244
|
* ```typescript
|
|
3492
3245
|
* // Basic usage
|
|
3493
3246
|
* const params: ChargingStationsAvailabilityParams = {
|
|
3494
|
-
*
|
|
3247
|
+
* apiKey: 'your-api-key',
|
|
3495
3248
|
* id: 'charging-park-id-from-search'
|
|
3496
3249
|
* };
|
|
3497
3250
|
*
|
|
@@ -3500,7 +3253,7 @@ type ChargingStationsAvailabilityResponseAPI = {
|
|
|
3500
3253
|
* const chargingParkId = searchResult.features[0].properties.dataSources?.chargingAvailability?.id;
|
|
3501
3254
|
*
|
|
3502
3255
|
* const params: ChargingStationsAvailabilityParams = {
|
|
3503
|
-
*
|
|
3256
|
+
* apiKey: 'your-api-key',
|
|
3504
3257
|
* id: chargingParkId
|
|
3505
3258
|
* };
|
|
3506
3259
|
* ```
|
|
@@ -3532,6 +3285,31 @@ type ChargingStationsAvailabilityParams = CommonServiceParams<URL, ChargingStati
|
|
|
3532
3285
|
*/
|
|
3533
3286
|
id: string;
|
|
3534
3287
|
};
|
|
3288
|
+
/**
|
|
3289
|
+
* Options of {@link getPlacesWithEVAvailability}: the common service parameters forwarded to each
|
|
3290
|
+
* availability request, how many of those requests may be in flight at once, and what to do with
|
|
3291
|
+
* the places left without availability.
|
|
3292
|
+
*
|
|
3293
|
+
* @group EV Charging
|
|
3294
|
+
*/
|
|
3295
|
+
type PlacesWithEVAvailabilityOptions = Omit<ChargingStationsAvailabilityParams, 'id'> & {
|
|
3296
|
+
/**
|
|
3297
|
+
* The most availability requests in flight at once. Values below 1 count as 1.
|
|
3298
|
+
*
|
|
3299
|
+
* @remarks
|
|
3300
|
+
* Each request counts against your API key's QPS (queries per second) limit. The SDK retries a
|
|
3301
|
+
* rate-limited (`429`) request with backoff bounded by the global `retry.timeoutMs`, so a value
|
|
3302
|
+
* above that limit slows the call down; a request still rejected leaves its place with unknown
|
|
3303
|
+
* availability.
|
|
3304
|
+
* @default 1
|
|
3305
|
+
*/
|
|
3306
|
+
maxConcurrentRequests?: number;
|
|
3307
|
+
/**
|
|
3308
|
+
* If true, places with unknown availability are filtered out. Otherwise, they are returned unchanged.
|
|
3309
|
+
* @default false
|
|
3310
|
+
*/
|
|
3311
|
+
excludeIfAvailabilityUnknown?: boolean;
|
|
3312
|
+
};
|
|
3535
3313
|
//#endregion
|
|
3536
3314
|
//#region src/ev-charging-stations-availability/evChargingStationsAvailability.d.ts
|
|
3537
3315
|
/**
|
|
@@ -3624,15 +3402,15 @@ export declare const getPlaceWithEVAvailability: <P extends CommonPlaceProps = C
|
|
|
3624
3402
|
* and merges it into their properties. Non-EV places and EV stations without availability data are returned unchanged.
|
|
3625
3403
|
*
|
|
3626
3404
|
* @remarks
|
|
3627
|
-
* **
|
|
3628
|
-
*
|
|
3629
|
-
*
|
|
3630
|
-
* request, skips the remaining ones and rejects with {@link SDKAbortError}.
|
|
3405
|
+
* **One request per station**, at most `maxConcurrentRequests` at a time — one by default, so a
|
|
3406
|
+
* large result set takes as many round trips in series. A failed request leaves its place with
|
|
3407
|
+
* unknown availability rather than failing the call.
|
|
3631
3408
|
*
|
|
3632
|
-
*
|
|
3633
|
-
*
|
|
3409
|
+
* Pass a `signal` to stop early: aborting it cancels the in-flight requests, skips the remaining
|
|
3410
|
+
* ones and rejects with {@link SDKAbortError}. Needs the same API key access as
|
|
3411
|
+
* {@link evChargingStationsAvailability}.
|
|
3634
3412
|
*
|
|
3635
|
-
* @param places - Collection of places to enhance
|
|
3413
|
+
* @param places - Collection of places to enhance, returned in the same order
|
|
3636
3414
|
* @param options - Configuration options, including common service parameters (e.g. `apiKey`, `onAPIRequest`, `signal`) forwarded to each availability request
|
|
3637
3415
|
*
|
|
3638
3416
|
* @returns Promise resolving to places collection with merged availability
|
|
@@ -3658,16 +3436,10 @@ export declare const getPlaceWithEVAvailability: <P extends CommonPlaceProps = C
|
|
|
3658
3436
|
*
|
|
3659
3437
|
* @group EV Charging
|
|
3660
3438
|
*/
|
|
3661
|
-
export declare function getPlacesWithEVAvailability<P extends CommonPlaceProps = CommonPlaceProps>(places: Places<P>, options
|
|
3439
|
+
export declare function getPlacesWithEVAvailability<P extends CommonPlaceProps = CommonPlaceProps>(places: Places<P>, options: PlacesWithEVAvailabilityOptions & {
|
|
3662
3440
|
excludeIfAvailabilityUnknown: true;
|
|
3663
3441
|
}): Promise<Places<EVChargingStationWithAvailabilityPlaceProps>>;
|
|
3664
|
-
export declare function getPlacesWithEVAvailability<P extends CommonPlaceProps = CommonPlaceProps>(places: Places<P>, options?:
|
|
3665
|
-
/**
|
|
3666
|
-
* If true, places with unknown availability will be filtered out. Otherwise, they will be included.
|
|
3667
|
-
* @default false
|
|
3668
|
-
*/
|
|
3669
|
-
excludeIfAvailabilityUnknown?: false;
|
|
3670
|
-
}): Promise<Places<P | EVChargingStationWithAvailabilityPlaceProps>>;
|
|
3442
|
+
export declare function getPlacesWithEVAvailability<P extends CommonPlaceProps = CommonPlaceProps>(places: Places<P>, options?: PlacesWithEVAvailabilityOptions): Promise<Places<P | EVChargingStationWithAvailabilityPlaceProps>>;
|
|
3671
3443
|
/**
|
|
3672
3444
|
* Type guard to check if a ChargingPark has availability data.
|
|
3673
3445
|
*
|
|
@@ -4104,388 +3876,93 @@ type GeometryPlaceParams = CommonServiceParamsWithZoom & {
|
|
|
4104
3876
|
/**
|
|
4105
3877
|
* Union type for all geometry data parameter formats.
|
|
4106
3878
|
*
|
|
4107
|
-
* Accepts either geometry IDs directly or places containing geometry IDs.
|
|
4108
|
-
*
|
|
4109
|
-
* @remarks
|
|
4110
|
-
* **Choose the right type:**
|
|
4111
|
-
* - {@link GeometryDataParams}: When you have geometry IDs as strings
|
|
4112
|
-
* - {@link GeometryPlaceParams}: When you have place objects from search
|
|
4113
|
-
*
|
|
4114
|
-
* @example
|
|
4115
|
-
* ```typescript
|
|
4116
|
-
* // Using IDs
|
|
4117
|
-
* const idParams: GeometryParams = {
|
|
4118
|
-
* key: 'your-api-key',
|
|
4119
|
-
* geometries: ['g1234567890']
|
|
4120
|
-
* };
|
|
4121
|
-
*
|
|
4122
|
-
* // Using places
|
|
4123
|
-
* const placeParams: GeometryParams = {
|
|
4124
|
-
* key: 'your-api-key',
|
|
4125
|
-
* geometries: searchResults
|
|
4126
|
-
* };
|
|
4127
|
-
* ```
|
|
4128
|
-
*
|
|
4129
|
-
* @group Geometry
|
|
4130
|
-
*/
|
|
4131
|
-
type GeometryParams = GeometryDataParams | GeometryPlaceParams;
|
|
4132
|
-
//#endregion
|
|
4133
|
-
//#region src/geometry-data/geometryData.d.ts
|
|
4134
|
-
/**
|
|
4135
|
-
* Retrieve polygon geometries representing geographic area boundaries.
|
|
4136
|
-
*
|
|
4137
|
-
* The Geometry Data service returns coordinate sets that define the outlines of
|
|
4138
|
-
* geographic areas such as cities, countries, administrative regions, or POI footprints.
|
|
4139
|
-
* These polygons enable visualization of area boundaries, spatial analysis, and
|
|
4140
|
-
* geofencing applications.
|
|
4141
|
-
*
|
|
4142
|
-
* @remarks
|
|
4143
|
-
* Key features:
|
|
4144
|
-
* - **Batch requests**: Fetch up to 20 geometries in a single call
|
|
4145
|
-
* - **Multiple scales**: From countries down to building footprints
|
|
4146
|
-
* - **Place integration**: Can merge with place data for enriched results
|
|
4147
|
-
* - **Standard GeoJSON**: Returns standard Polygon/MultiPolygon features
|
|
4148
|
-
*
|
|
4149
|
-
* Common use cases:
|
|
4150
|
-
* - Display city or country boundaries on maps
|
|
4151
|
-
* - Show POI building footprints
|
|
4152
|
-
* - Create geofences for spatial queries
|
|
4153
|
-
* - Visualize administrative divisions
|
|
4154
|
-
* - Calculate areas and spatial relationships
|
|
4155
|
-
*
|
|
4156
|
-
* Returns polygons, not places. Pass the result to `GeometriesModule.show()`,
|
|
4157
|
-
* not `PlacesModule.show()`. The `geometryId` comes from a prior search result.
|
|
4158
|
-
*
|
|
4159
|
-
* @param params - Geometry parameters with IDs or places to fetch boundaries for
|
|
4160
|
-
*
|
|
4161
|
-
* @returns Promise resolving to polygon features representing area boundaries
|
|
4162
|
-
*
|
|
4163
|
-
* @example
|
|
4164
|
-
* ```typescript
|
|
4165
|
-
* // Fetch geometry by ID
|
|
4166
|
-
* const cityBoundary = await geometryData({
|
|
4167
|
-
* key: 'your-api-key',
|
|
4168
|
-
* geometries: ['geometry-id-123']
|
|
4169
|
-
* });
|
|
4170
|
-
*
|
|
4171
|
-
* // Fetch multiple geometries at once
|
|
4172
|
-
* const boundaries = await geometryData({
|
|
4173
|
-
* key: 'your-api-key',
|
|
4174
|
-
* geometries: ['country-id-1', 'city-id-2', 'poi-id-3']
|
|
4175
|
-
* });
|
|
4176
|
-
*
|
|
4177
|
-
* // Fetch and merge with place data
|
|
4178
|
-
* const searchResults = await discoverPlaces({ query: 'Amsterdam' });
|
|
4179
|
-
* const withBoundaries = await geometryData({
|
|
4180
|
-
* key: 'your-api-key',
|
|
4181
|
-
* geometries: searchResults // Places with geometry IDs
|
|
4182
|
-
* });
|
|
4183
|
-
* // Result includes both place properties and polygon boundaries
|
|
4184
|
-
* ```
|
|
4185
|
-
*
|
|
4186
|
-
* @see [Geometry Data API Documentation](https://docs.tomtom.com/search-api/documentation/additional-data-service/additional-data)
|
|
4187
|
-
* @see [Places Quickstart Guide](https://docs.tomtom.com/maps-sdk-js/guides/services/places/quickstart)
|
|
4188
|
-
* @see [Geometry Data Guide](https://docs.tomtom.com/maps-sdk-js/guides/services/places/geometry-data)
|
|
4189
|
-
*
|
|
4190
|
-
* @group Geometry
|
|
4191
|
-
*/
|
|
4192
|
-
export declare function geometryData(params: GeometryDataParams): Promise<PolygonFeatures>;
|
|
4193
|
-
export declare function geometryData(params: GeometryPlaceParams): Promise<PolygonFeatures<CommonPlaceProps>>;
|
|
4194
|
-
//#endregion
|
|
4195
|
-
//#region src/geometry-search/types/geometrySearchRequestAPI.d.ts
|
|
4196
|
-
/**
|
|
4197
|
-
* @ignore
|
|
4198
|
-
*/
|
|
4199
|
-
type PolygonAPI = {
|
|
4200
|
-
type: 'POLYGON';
|
|
4201
|
-
vertices: string[];
|
|
4202
|
-
};
|
|
4203
|
-
/**
|
|
4204
|
-
* @ignore
|
|
4205
|
-
*/
|
|
4206
|
-
type CircleAPI = {
|
|
4207
|
-
type: 'CIRCLE';
|
|
4208
|
-
position: string;
|
|
4209
|
-
radius: number;
|
|
4210
|
-
};
|
|
4211
|
-
/**
|
|
4212
|
-
* @ignore
|
|
4213
|
-
*/
|
|
4214
|
-
type GeometryAPI = PolygonAPI | CircleAPI;
|
|
4215
|
-
/**
|
|
4216
|
-
* @ignore
|
|
4217
|
-
*/
|
|
4218
|
-
type GeometrySearchPayloadAPI = {
|
|
4219
|
-
geometryList: GeometryAPI[];
|
|
4220
|
-
};
|
|
4221
|
-
/**
|
|
4222
|
-
* Geometry search request type.
|
|
4223
|
-
* @ignore
|
|
4224
|
-
*/
|
|
4225
|
-
type GeometrySearchRequestAPI = PostObject<GeometrySearchPayloadAPI>;
|
|
4226
|
-
//#endregion
|
|
4227
|
-
//#region src/geometry-search/types/geometrySearchResponseAPI.d.ts
|
|
4228
|
-
/**
|
|
4229
|
-
* @ignore
|
|
4230
|
-
*/
|
|
4231
|
-
type GeometrySearchResultAPI = CommonSearchPlaceResultAPI;
|
|
4232
|
-
/**
|
|
4233
|
-
* @ignore
|
|
4234
|
-
*/
|
|
4235
|
-
type GeometrySearchResponseAPI = {
|
|
4236
|
-
/**
|
|
4237
|
-
* Summary information about the search that was performed.
|
|
4238
|
-
*/
|
|
4239
|
-
summary: SummaryAPI$1;
|
|
4240
|
-
/**
|
|
4241
|
-
* The result list, sorted in descending order by score.
|
|
4242
|
-
*/
|
|
4243
|
-
results: GeometrySearchResultAPI[];
|
|
4244
|
-
};
|
|
4245
|
-
//#endregion
|
|
4246
|
-
//#region src/geometry-search/types/geometrySearchParams.d.ts
|
|
4247
|
-
/**
|
|
4248
|
-
* Parameters for searching places within specific geographic areas (geometry search).
|
|
4249
|
-
*
|
|
4250
|
-
* Geometry search finds places that fall within or near the boundaries of one or more
|
|
4251
|
-
* geometric shapes (polygons, circles, or multipolygons). This enables area-based searches
|
|
4252
|
-
* like "restaurants in this neighborhood" or "hotels within these city boundaries".
|
|
4253
|
-
*
|
|
4254
|
-
* @remarks
|
|
4255
|
-
* Pass these to {@link discoverPlaces}, which selects the request variant from the params it is given:
|
|
4256
|
-
* a `route` property dispatches to along-route search, a `geometries` property to geometry search,
|
|
4257
|
-
* and neither to fuzzy search. There is no separate exported function for geometry search.
|
|
4258
|
-
*
|
|
4259
|
-
* **Key Features:**
|
|
4260
|
-
* - Search within multiple geometries simultaneously
|
|
4261
|
-
* - Supports polygons, multipolygons, and circles
|
|
4262
|
-
* - Can use geometries from previous search results
|
|
4263
|
-
* - Combines with text queries for filtered results
|
|
4264
|
-
*
|
|
4265
|
-
* **Use Cases:**
|
|
4266
|
-
* - Find POIs within administrative boundaries
|
|
4267
|
-
* - Search within custom drawn areas on map
|
|
4268
|
-
* - Filter results to specific neighborhoods or regions
|
|
4269
|
-
* - Proximity searches using circles
|
|
4270
|
-
*
|
|
4271
|
-
* @example
|
|
4272
|
-
* ```typescript
|
|
4273
|
-
* // Search within a circular area
|
|
4274
|
-
* const results = await discoverPlaces({
|
|
4275
|
-
* key: 'your-api-key',
|
|
4276
|
-
* query: 'restaurant',
|
|
4277
|
-
* geometries: [{
|
|
4278
|
-
* type: 'Circle',
|
|
4279
|
-
* coordinates: [4.9041, 52.3676],
|
|
4280
|
-
* radius: 1000 // meters
|
|
4281
|
-
* }]
|
|
4282
|
-
* });
|
|
4283
|
-
* ```
|
|
4284
|
-
*
|
|
4285
|
-
* @example
|
|
4286
|
-
* ```typescript
|
|
4287
|
-
* // Search within a polygon
|
|
4288
|
-
* const results = await discoverPlaces({
|
|
4289
|
-
* key: 'your-api-key',
|
|
4290
|
-
* query: 'parking',
|
|
4291
|
-
* geometries: [{
|
|
4292
|
-
* type: 'Polygon',
|
|
4293
|
-
* coordinates: [[
|
|
4294
|
-
* [4.88, 52.36],
|
|
4295
|
-
* [4.90, 52.36],
|
|
4296
|
-
* [4.90, 52.38],
|
|
4297
|
-
* [4.88, 52.38],
|
|
4298
|
-
* [4.88, 52.36]
|
|
4299
|
-
* ]]
|
|
4300
|
-
* }]
|
|
4301
|
-
* });
|
|
4302
|
-
* ```
|
|
4303
|
-
*
|
|
4304
|
-
* @group Places Search
|
|
4305
|
-
*/
|
|
4306
|
-
type GeometrySearchParams = CommonSearchParams<GeometrySearchRequestAPI, GeometrySearchResponseAPI> & {
|
|
4307
|
-
/**
|
|
4308
|
-
* List of geometries to search within.
|
|
4309
|
-
*
|
|
4310
|
-
* Can be a mix of polygons, multipolygons, circles, or geometry feature collections
|
|
4311
|
-
* from previous search results. Places that fall within or near these geometries
|
|
4312
|
-
* will be returned.
|
|
4313
|
-
*
|
|
4314
|
-
* @remarks
|
|
4315
|
-
* Also referred to as "geometryList" in API documentation.
|
|
4316
|
-
*
|
|
4317
|
-
* **Supported Types:**
|
|
4318
|
-
* - {@link Circle} - Circular search area with radius
|
|
4319
|
-
* - `Polygon` - Custom polygon boundary (GeoJSON)
|
|
4320
|
-
* - `MultiPolygon` - Multiple polygon areas (GeoJSON)
|
|
4321
|
-
* - `PolygonFeatures` - Feature collection with polygon geometries
|
|
4322
|
-
*
|
|
4323
|
-
* @example
|
|
4324
|
-
* ```typescript
|
|
4325
|
-
* // Multiple geometries
|
|
4326
|
-
* geometries: [
|
|
4327
|
-
* { type: 'Circle', coordinates: [4.9, 52.3], radius: 500 },
|
|
4328
|
-
* { type: 'Polygon', coordinates: [[...]] }
|
|
4329
|
-
* ]
|
|
4330
|
-
* ```
|
|
4331
|
-
*/
|
|
4332
|
-
geometries: SearchGeometryInput[];
|
|
4333
|
-
};
|
|
4334
|
-
/**
|
|
4335
|
-
* Circular search geometry (non-standard GeoJSON extension).
|
|
4336
|
-
*
|
|
4337
|
-
* Defines a circular search area by center point and radius. This is a convenience
|
|
4338
|
-
* type since standard GeoJSON does not include circles.
|
|
4339
|
-
*
|
|
4340
|
-
* @remarks
|
|
4341
|
-
* **Note:** This is not part of the official GeoJSON specification. It's a Maps SDK
|
|
4342
|
-
* extension that gets converted to the appropriate API format internally.
|
|
4343
|
-
*
|
|
4344
|
-
* **Coordinate Format:** `[longitude, latitude]` (standard GeoJSON order)
|
|
4345
|
-
*
|
|
4346
|
-
* @example
|
|
4347
|
-
* ```typescript
|
|
4348
|
-
* const circle: Circle = {
|
|
4349
|
-
* type: 'Circle',
|
|
4350
|
-
* coordinates: [4.9041, 52.3676], // Amsterdam center
|
|
4351
|
-
* radius: 2000 // 2km radius
|
|
4352
|
-
* };
|
|
4353
|
-
* ```
|
|
4354
|
-
*
|
|
4355
|
-
* @group Places Search
|
|
4356
|
-
*/
|
|
4357
|
-
interface Circle {
|
|
4358
|
-
/**
|
|
4359
|
-
* Geometry type identifier.
|
|
4360
|
-
* Must be the literal string `'Circle'`.
|
|
4361
|
-
*/
|
|
4362
|
-
type: 'Circle';
|
|
4363
|
-
/**
|
|
4364
|
-
* Center point of the circle in `[longitude, latitude]` format.
|
|
4365
|
-
*
|
|
4366
|
-
* @example [4.9041, 52.3676]
|
|
4367
|
-
*/
|
|
4368
|
-
coordinates: Position;
|
|
4369
|
-
/**
|
|
4370
|
-
* Radius of the circle in meters.
|
|
4371
|
-
*
|
|
4372
|
-
* @remarks
|
|
4373
|
-
* Defines the search area around the center point. Places within or near
|
|
4374
|
-
* this radius will be included in results.
|
|
4375
|
-
*
|
|
4376
|
-
* @example 1000 // 1 kilometer
|
|
4377
|
-
*/
|
|
4378
|
-
radius: number;
|
|
4379
|
-
}
|
|
4380
|
-
/**
|
|
4381
|
-
* Union type of all supported geometry search input formats.
|
|
4382
|
-
*
|
|
4383
|
-
* Accepts standard GeoJSON polygons/multipolygons, custom circles, or polygon
|
|
4384
|
-
* feature collections (such as those returned from previous searches or the
|
|
4385
|
-
* geometry data service).
|
|
4386
|
-
*
|
|
3879
|
+
* Accepts either geometry IDs directly or places containing geometry IDs.
|
|
3880
|
+
*
|
|
4387
3881
|
* @remarks
|
|
4388
|
-
* **
|
|
4389
|
-
* -
|
|
4390
|
-
* -
|
|
4391
|
-
* - Pass search results with geometries as boundaries
|
|
4392
|
-
* - Define custom polygons for precise area searches
|
|
3882
|
+
* **Choose the right type:**
|
|
3883
|
+
* - {@link GeometryDataParams}: When you have geometry IDs as strings
|
|
3884
|
+
* - {@link GeometryPlaceParams}: When you have place objects from search
|
|
4393
3885
|
*
|
|
4394
3886
|
* @example
|
|
4395
3887
|
* ```typescript
|
|
4396
|
-
* // Using
|
|
4397
|
-
* const
|
|
4398
|
-
*
|
|
4399
|
-
*
|
|
4400
|
-
*
|
|
4401
|
-
* // Polygon
|
|
4402
|
-
* {
|
|
4403
|
-
* type: 'Polygon',
|
|
4404
|
-
* coordinates: [[
|
|
4405
|
-
* [4.88, 52.36], [4.90, 52.36], [4.90, 52.38], [4.88, 52.38], [4.88, 52.36]
|
|
4406
|
-
* ]]
|
|
4407
|
-
* },
|
|
3888
|
+
* // Using IDs
|
|
3889
|
+
* const idParams: GeometryParams = {
|
|
3890
|
+
* key: 'your-api-key',
|
|
3891
|
+
* geometries: ['g1234567890']
|
|
3892
|
+
* };
|
|
4408
3893
|
*
|
|
4409
|
-
*
|
|
4410
|
-
*
|
|
4411
|
-
*
|
|
3894
|
+
* // Using places
|
|
3895
|
+
* const placeParams: GeometryParams = {
|
|
3896
|
+
* key: 'your-api-key',
|
|
3897
|
+
* geometries: searchResults
|
|
3898
|
+
* };
|
|
4412
3899
|
* ```
|
|
4413
3900
|
*
|
|
4414
|
-
* @group
|
|
3901
|
+
* @group Geometry
|
|
4415
3902
|
*/
|
|
4416
|
-
type
|
|
3903
|
+
type GeometryParams = GeometryDataParams | GeometryPlaceParams;
|
|
4417
3904
|
//#endregion
|
|
4418
|
-
//#region src/geometry-
|
|
3905
|
+
//#region src/geometry-data/geometryData.d.ts
|
|
4419
3906
|
/**
|
|
4420
|
-
*
|
|
3907
|
+
* Retrieve polygon geometries representing geographic area boundaries.
|
|
4421
3908
|
*
|
|
4422
|
-
*
|
|
4423
|
-
*
|
|
3909
|
+
* The Geometry Data service returns coordinate sets that define the outlines of
|
|
3910
|
+
* geographic areas such as cities, countries, administrative regions, or POI footprints.
|
|
3911
|
+
* These polygons enable visualization of area boundaries, spatial analysis, and
|
|
3912
|
+
* geofencing applications.
|
|
4424
3913
|
*
|
|
4425
3914
|
* @remarks
|
|
4426
|
-
*
|
|
4427
|
-
* -
|
|
4428
|
-
* -
|
|
4429
|
-
* -
|
|
4430
|
-
* -
|
|
4431
|
-
* - Search within administrative boundaries
|
|
4432
|
-
*
|
|
4433
|
-
* **Supported Geometries:**
|
|
4434
|
-
* - Polygon: Search within a multi-sided boundary
|
|
4435
|
-
* - Circle: Search within a radius around a point
|
|
3915
|
+
* Key features:
|
|
3916
|
+
* - **Batch requests**: Fetch up to 20 geometries in a single call
|
|
3917
|
+
* - **Multiple scales**: From countries down to building footprints
|
|
3918
|
+
* - **Place integration**: Can merge with place data for enriched results
|
|
3919
|
+
* - **Standard GeoJSON**: Returns standard Polygon/MultiPolygon features
|
|
4436
3920
|
*
|
|
4437
|
-
*
|
|
4438
|
-
*
|
|
4439
|
-
*
|
|
4440
|
-
*
|
|
4441
|
-
*
|
|
4442
|
-
*
|
|
4443
|
-
* type: 'Feature',
|
|
4444
|
-
* geometry: { type: 'Point', coordinates: [4.9, 52.3] },
|
|
4445
|
-
* properties: {
|
|
4446
|
-
* type: 'POI',
|
|
4447
|
-
* poi: { name: 'Restaurant', categories: ['RESTAURANT'] },
|
|
4448
|
-
* address: { streetName: 'Main Street' },
|
|
4449
|
-
* score: 0.95
|
|
4450
|
-
* }
|
|
4451
|
-
* }
|
|
4452
|
-
* ],
|
|
4453
|
-
* summary: {
|
|
4454
|
-
* numResults: 1,
|
|
4455
|
-
* query: 'restaurant',
|
|
4456
|
-
* queryTime: 45
|
|
4457
|
-
* }
|
|
4458
|
-
* };
|
|
4459
|
-
* ```
|
|
3921
|
+
* Common use cases:
|
|
3922
|
+
* - Display city or country boundaries on maps
|
|
3923
|
+
* - Show POI building footprints
|
|
3924
|
+
* - Create geofences for spatial queries
|
|
3925
|
+
* - Visualize administrative divisions
|
|
3926
|
+
* - Calculate areas and spatial relationships
|
|
4460
3927
|
*
|
|
4461
|
-
*
|
|
4462
|
-
|
|
4463
|
-
type GeometrySearchResponse = Places<SearchPlaceProps, GeometrySearchFeatureCollectionProps>;
|
|
4464
|
-
/**
|
|
4465
|
-
* Properties attached to the geometry search feature collection.
|
|
3928
|
+
* Returns polygons, not places. Pass the result to `GeometriesModule.show()`,
|
|
3929
|
+
* not `PlacesModule.show()`. The `geometryId` comes from a prior search result.
|
|
4466
3930
|
*
|
|
4467
|
-
*
|
|
3931
|
+
* @param params - Geometry parameters with IDs or places to fetch boundaries for
|
|
4468
3932
|
*
|
|
4469
|
-
* @
|
|
4470
|
-
* Provides metadata about:
|
|
4471
|
-
* - Number of results found
|
|
4472
|
-
* - Query that was executed
|
|
4473
|
-
* - Performance metrics
|
|
4474
|
-
* - Fuzzy matching level applied
|
|
3933
|
+
* @returns Promise resolving to polygon features representing area boundaries
|
|
4475
3934
|
*
|
|
4476
3935
|
* @example
|
|
4477
3936
|
* ```typescript
|
|
4478
|
-
*
|
|
4479
|
-
*
|
|
4480
|
-
*
|
|
4481
|
-
*
|
|
4482
|
-
*
|
|
4483
|
-
*
|
|
3937
|
+
* // Fetch geometry by ID
|
|
3938
|
+
* const cityBoundary = await geometryData({
|
|
3939
|
+
* key: 'your-api-key',
|
|
3940
|
+
* geometries: ['geometry-id-123']
|
|
3941
|
+
* });
|
|
3942
|
+
*
|
|
3943
|
+
* // Fetch multiple geometries at once
|
|
3944
|
+
* const boundaries = await geometryData({
|
|
3945
|
+
* key: 'your-api-key',
|
|
3946
|
+
* geometries: ['country-id-1', 'city-id-2', 'poi-id-3']
|
|
3947
|
+
* });
|
|
3948
|
+
*
|
|
3949
|
+
* // Fetch and merge with place data
|
|
3950
|
+
* const searchResults = await discoverPlaces({ query: 'Amsterdam' });
|
|
3951
|
+
* const withBoundaries = await geometryData({
|
|
3952
|
+
* key: 'your-api-key',
|
|
3953
|
+
* geometries: searchResults // Places with geometry IDs
|
|
3954
|
+
* });
|
|
3955
|
+
* // Result includes both place properties and polygon boundaries
|
|
4484
3956
|
* ```
|
|
4485
3957
|
*
|
|
4486
|
-
* @
|
|
3958
|
+
* @see [Geometry Data API Documentation](https://docs.tomtom.com/search-api/documentation/additional-data-service/additional-data)
|
|
3959
|
+
* @see [Places Quickstart Guide](https://docs.tomtom.com/maps-sdk-js/guides/services/places/quickstart)
|
|
3960
|
+
* @see [Geometry Data Guide](https://docs.tomtom.com/maps-sdk-js/guides/services/places/geometry-data)
|
|
3961
|
+
*
|
|
3962
|
+
* @group Geometry
|
|
4487
3963
|
*/
|
|
4488
|
-
|
|
3964
|
+
export declare function geometryData(params: GeometryDataParams): Promise<PolygonFeatures>;
|
|
3965
|
+
export declare function geometryData(params: GeometryPlaceParams): Promise<PolygonFeatures<CommonPlaceProps>>;
|
|
4489
3966
|
//#endregion
|
|
4490
3967
|
//#region src/place-details/types/placeDetailsResponseAPI.d.ts
|
|
4491
3968
|
/**
|
|
@@ -4534,34 +4011,10 @@ type PlaceDetailsOptionalParams = {
|
|
|
4534
4011
|
*/
|
|
4535
4012
|
mapcodes?: MapcodeType[];
|
|
4536
4013
|
/**
|
|
4537
|
-
* Geopolitical view
|
|
4538
|
-
*
|
|
4539
|
-
* @remarks
|
|
4540
|
-
* Determines how disputed territories are handled in the response.
|
|
4541
|
-
*
|
|
4542
|
-
* **Available Views:**
|
|
4543
|
-
* - `Unified`: International view (default)
|
|
4544
|
-
* - `AR`: Argentina
|
|
4545
|
-
* - `IN`: India
|
|
4546
|
-
* - `PK`: Pakistan
|
|
4547
|
-
* - `IL`: Israel
|
|
4548
|
-
* - `MA`: Morocco
|
|
4549
|
-
* - `RU`: Russia
|
|
4550
|
-
* - `TR`: Turkey
|
|
4551
|
-
* - `CN`: China
|
|
4552
|
-
* - `TW`: Taiwan
|
|
4553
|
-
* - `RS`: Serbia
|
|
4554
|
-
*
|
|
4555
|
-
* `MA` is accepted by this type but is not supported by the current backend.
|
|
4556
|
-
*
|
|
4557
|
-
* @default 'Unified'
|
|
4558
|
-
*
|
|
4559
|
-
* @example
|
|
4560
|
-
* ```typescript
|
|
4561
|
-
* view: 'IN' // Indian geopolitical view
|
|
4562
|
-
* ```
|
|
4014
|
+
* Geopolitical view of the result, overriding the global one: which country a place in a
|
|
4015
|
+
* disputed territory belongs to. See {@link GeopoliticalView}.
|
|
4563
4016
|
*/
|
|
4564
|
-
|
|
4017
|
+
geopoliticalView?: GeopoliticalView;
|
|
4565
4018
|
/**
|
|
4566
4019
|
* Include opening hours information in the response.
|
|
4567
4020
|
*
|
|
@@ -4776,18 +4229,17 @@ type PoiCategoriesResponseAPI = {
|
|
|
4776
4229
|
*/
|
|
4777
4230
|
type POICategoriesParams = CommonServiceParams<GetObject, PoiCategoriesResponseAPI> & {
|
|
4778
4231
|
/**
|
|
4779
|
-
*
|
|
4780
|
-
*
|
|
4781
|
-
* Each filter string is normalized (lowercased, spaces removed) and matched against
|
|
4782
|
-
* the normalized form of every `name` and synonym. A category matches when any of its
|
|
4783
|
-
* normalized texts contains the normalized filter as a substring.
|
|
4232
|
+
* Keywords matched client-side against every category's name and synonyms, strongest match first.
|
|
4784
4233
|
*
|
|
4785
|
-
*
|
|
4786
|
-
* or
|
|
4787
|
-
* matches
|
|
4234
|
+
* - A category code (`'CAFE'`) matches that category only. Any other filter ranks an exact name or
|
|
4235
|
+
* synonym first, then a name or synonym the filter starts, one holding it as a later word, and
|
|
4236
|
+
* last one holding it as a substring. Each filter keeps only the matches ranking close to its best.
|
|
4237
|
+
* - Case, accents and punctuation are ignored, and spaces too in the substring tiers: `'bar'` finds
|
|
4238
|
+
* Bar but not Nail Salon ("Nail Bar"), and `'bookstore'` finds Book Shop ("Book Store").
|
|
4239
|
+
* - Several filters merge round-robin, so each filter's best match comes first, one entry per `code`.
|
|
4240
|
+
* A category ranking below its matched parent is left out, as the parent already covers it.
|
|
4788
4241
|
*
|
|
4789
|
-
*
|
|
4790
|
-
* Omit to return all categories.
|
|
4242
|
+
* A blank filter matches nothing. Omit `filters` to return all categories.
|
|
4791
4243
|
*
|
|
4792
4244
|
* @example
|
|
4793
4245
|
* ```ts
|
|
@@ -4803,6 +4255,13 @@ type POICategoriesParams = CommonServiceParams<GetObject, PoiCategoriesResponseA
|
|
|
4803
4255
|
*/
|
|
4804
4256
|
filters?: string[];
|
|
4805
4257
|
};
|
|
4258
|
+
/**
|
|
4259
|
+
* Parameters for `resolvePOICategories`: the {@link POICategoriesParams}, with the words to resolve
|
|
4260
|
+
* required in `filters`.
|
|
4261
|
+
*
|
|
4262
|
+
* @group POI Categories
|
|
4263
|
+
*/
|
|
4264
|
+
type ResolvePOICategoriesParams = POICategoriesParams & Required<Pick<POICategoriesParams, 'filters'>>;
|
|
4806
4265
|
//#endregion
|
|
4807
4266
|
//#region src/poi-categories/types/poiCategoriesResponse.d.ts
|
|
4808
4267
|
/**
|
|
@@ -4819,11 +4278,7 @@ type POICategoryResult = {
|
|
|
4819
4278
|
*/
|
|
4820
4279
|
code: POICategory;
|
|
4821
4280
|
/**
|
|
4822
|
-
* Codes of sub-categories
|
|
4823
|
-
*
|
|
4824
|
-
* Only contains codes present in the filtered result set — not the full list of
|
|
4825
|
-
* possible sub-categories — so you can understand the category hierarchy without
|
|
4826
|
-
* additional lookups.
|
|
4281
|
+
* Codes of this category's sub-categories, whether or not they matched the `filters`.
|
|
4827
4282
|
*
|
|
4828
4283
|
* Use these values directly in a search's `filters.poiCategories`.
|
|
4829
4284
|
*/
|
|
@@ -4845,6 +4300,17 @@ type POICategoryResult = {
|
|
|
4845
4300
|
type POICategoriesResponse = {
|
|
4846
4301
|
poiCategories: POICategoryResult[];
|
|
4847
4302
|
};
|
|
4303
|
+
/**
|
|
4304
|
+
* What `resolvePOICategories` returns.
|
|
4305
|
+
*
|
|
4306
|
+
* @group POI Categories
|
|
4307
|
+
*/
|
|
4308
|
+
type ResolvedPOICategories = {
|
|
4309
|
+
/** The codes for a search's `filters.poiCategories`, best first. Empty when no filter matched. */
|
|
4310
|
+
poiCategories: POICategory[];
|
|
4311
|
+
/** The filters no category name, synonym or code matched, as given. */
|
|
4312
|
+
unmatched: string[];
|
|
4313
|
+
};
|
|
4848
4314
|
//#endregion
|
|
4849
4315
|
//#region src/poi-categories/poiCategories.d.ts
|
|
4850
4316
|
/**
|
|
@@ -4866,7 +4332,7 @@ type POICategoriesResponse = {
|
|
|
4866
4332
|
* // All categories
|
|
4867
4333
|
* const { poiCategories: all } = await getPOICategories();
|
|
4868
4334
|
*
|
|
4869
|
-
* // Filtered by keyword,
|
|
4335
|
+
* // Filtered by keyword, best match first
|
|
4870
4336
|
* const { poiCategories: gyms } = await getPOICategories({ filters: ['gym'] });
|
|
4871
4337
|
* gyms.forEach(c => console.log(c.code, c.name, c.childCategoryCodes));
|
|
4872
4338
|
* ```
|
|
@@ -4899,6 +4365,26 @@ export declare const getPOICategories: (params?: POICategoriesParams) => Promise
|
|
|
4899
4365
|
* @group POI Categories
|
|
4900
4366
|
*/
|
|
4901
4367
|
export declare const getPOICategoryCodes: (params?: POICategoriesParams) => Promise<POICategory[]>;
|
|
4368
|
+
/**
|
|
4369
|
+
* Resolves category words, or codes, to the POI categories of one search, and reports the words that
|
|
4370
|
+
* match none.
|
|
4371
|
+
*
|
|
4372
|
+
* @remarks
|
|
4373
|
+
* Each filter matches as on {@link getPOICategories}, so a code stays itself. Each keeps its best three
|
|
4374
|
+
* codes, merged round-robin and capped at the 10 a search accepts. Codes alone skip the catalog request.
|
|
4375
|
+
* `discoverPlaces` runs the same lookup for `filters.poiCategoryQuery`: call this first to decide what to
|
|
4376
|
+
* do about the words that match nothing. To browse every close match instead, use {@link getPOICategories}.
|
|
4377
|
+
*
|
|
4378
|
+
* @example
|
|
4379
|
+
* ```typescript
|
|
4380
|
+
* const { poiCategories, unmatched } = await resolvePOICategories({ filters: ['café', 'PHARMACY', 'xyzzy'] });
|
|
4381
|
+
* // unmatched: ['xyzzy']
|
|
4382
|
+
* const places = await discoverPlaces({ filters: { poiCategories }, geoBias: { position: [4.9041, 52.3676] } });
|
|
4383
|
+
* ```
|
|
4384
|
+
*
|
|
4385
|
+
* @group POI Categories
|
|
4386
|
+
*/
|
|
4387
|
+
export declare const resolvePOICategories: (parameters: ResolvePOICategoriesParams) => Promise<ResolvedPOICategories>;
|
|
4902
4388
|
//#endregion
|
|
4903
4389
|
//#region src/shared/types/apiRoutingRequestTypes.d.ts
|
|
4904
4390
|
/**
|
|
@@ -5696,11 +5182,18 @@ export declare const calculateReachableRange: (params: ReachableRangeParams) =>
|
|
|
5696
5182
|
* Note: Ranges are calculated sequentially to avoid rate limiting. For large batches,
|
|
5697
5183
|
* consider implementing your own parallel processing with appropriate throttling.
|
|
5698
5184
|
*
|
|
5185
|
+
* **A range the service answers with an error is skipped, not thrown**, unless that error is a 401,
|
|
5186
|
+
* 403 or 429: an origin off the drivable road network answers `NO_RANGE_FOUND`, which
|
|
5187
|
+
* {@link calculateReachableRange} rejects with. So `features` can be shorter than `paramsArray`, or
|
|
5188
|
+
* empty; each feature's `properties` carries the request it answers. An abort and an invalid request
|
|
5189
|
+
* still reject the whole batch.
|
|
5190
|
+
*
|
|
5699
5191
|
* @param paramsArray Array of reachable range parameters, one for each area to calculate
|
|
5700
5192
|
* @param options.signal An `AbortSignal` to cancel the in-flight request and skip the remaining ones.
|
|
5701
5193
|
* Composed with any per-entry `signal`, so either one cancels.
|
|
5702
5194
|
*
|
|
5703
|
-
* @returns Promise resolving to a FeatureCollection
|
|
5195
|
+
* @returns Promise resolving to a FeatureCollection with a polygon per range the service could
|
|
5196
|
+
* calculate, in request order
|
|
5704
5197
|
*
|
|
5705
5198
|
* @example
|
|
5706
5199
|
* ```typescript
|
|
@@ -5875,29 +5368,10 @@ type ReverseGeocodingOptionalParams = {
|
|
|
5875
5368
|
*/
|
|
5876
5369
|
radiusMeters?: number;
|
|
5877
5370
|
/**
|
|
5878
|
-
*
|
|
5879
|
-
*
|
|
5880
|
-
* @remarks
|
|
5881
|
-
* Determines how disputed territories and borders are represented in the response.
|
|
5882
|
-
*
|
|
5883
|
-
* Available views:
|
|
5884
|
-
* - `Unified` - International view (default)
|
|
5885
|
-
* - `AR` - Argentina
|
|
5886
|
-
* - `CN` - China
|
|
5887
|
-
* - `IL` - Israel
|
|
5888
|
-
* - `IN` - India
|
|
5889
|
-
* - `MA` - Morocco
|
|
5890
|
-
* - `PK` - Pakistan
|
|
5891
|
-
* - `RS` - Serbia
|
|
5892
|
-
* - `RU` - Russia
|
|
5893
|
-
* - `TR` - Turkey
|
|
5894
|
-
* - `TW` - Taiwan
|
|
5895
|
-
*
|
|
5896
|
-
* `MA` is accepted by this type but is not supported by the current backend.
|
|
5897
|
-
*
|
|
5898
|
-
* @defaultValue `"Unified"`
|
|
5371
|
+
* Geopolitical view of the result, overriding the global one: which country an address in a
|
|
5372
|
+
* disputed territory belongs to. See {@link GeopoliticalView}.
|
|
5899
5373
|
*/
|
|
5900
|
-
|
|
5374
|
+
geopoliticalView?: GeopoliticalView;
|
|
5901
5375
|
};
|
|
5902
5376
|
/**
|
|
5903
5377
|
* Complete parameter set for reverse geocoding service calls.
|
|
@@ -6600,37 +6074,152 @@ type RouteStopOptions = {
|
|
|
6600
6074
|
legCostModel?: LegCostModel;
|
|
6601
6075
|
};
|
|
6602
6076
|
//#endregion
|
|
6603
|
-
//#region src/
|
|
6077
|
+
//#region src/along-route-search/types/alongRouteSearchRequestAPI.d.ts
|
|
6078
|
+
/**
|
|
6079
|
+
* @ignore
|
|
6080
|
+
*/
|
|
6081
|
+
type RoutePointAPI = {
|
|
6082
|
+
lat: number;
|
|
6083
|
+
lon: number;
|
|
6084
|
+
};
|
|
6085
|
+
/**
|
|
6086
|
+
* @ignore
|
|
6087
|
+
*/
|
|
6088
|
+
type AlongRouteSearchPayloadAPI = {
|
|
6089
|
+
route: {
|
|
6090
|
+
points: RoutePointAPI[];
|
|
6091
|
+
};
|
|
6092
|
+
};
|
|
6093
|
+
/**
|
|
6094
|
+
* Along-route search request type.
|
|
6095
|
+
* @ignore
|
|
6096
|
+
*/
|
|
6097
|
+
type AlongRouteSearchRequestAPI = PostObject<AlongRouteSearchPayloadAPI>;
|
|
6098
|
+
//#endregion
|
|
6099
|
+
//#region src/along-route-search/types/alongRouteSearchResponseAPI.d.ts
|
|
6604
6100
|
/**
|
|
6605
|
-
*
|
|
6101
|
+
* @ignore
|
|
6102
|
+
*/
|
|
6103
|
+
type AlongRouteSearchResultAPI = CommonSearchPlaceResultAPI;
|
|
6104
|
+
/**
|
|
6105
|
+
* @ignore
|
|
6106
|
+
*/
|
|
6107
|
+
type AlongRouteSearchResponseAPI = {
|
|
6108
|
+
/**
|
|
6109
|
+
* Summary information about the search that was performed.
|
|
6110
|
+
*/
|
|
6111
|
+
summary: SummaryAPI$1;
|
|
6112
|
+
/**
|
|
6113
|
+
* The result list, sorted by detour time or offset.
|
|
6114
|
+
*/
|
|
6115
|
+
results: AlongRouteSearchResultAPI[];
|
|
6116
|
+
};
|
|
6117
|
+
//#endregion
|
|
6118
|
+
//#region src/along-route-search/types/alongRouteSearchParams.d.ts
|
|
6119
|
+
/**
|
|
6120
|
+
* Result sorting order for along-route search.
|
|
6606
6121
|
*
|
|
6607
|
-
*
|
|
6608
|
-
* about detected query intents (coordinates, nearby searches, what3words, bookmarks).
|
|
6122
|
+
* Controls how the returned POIs are ordered relative to the route.
|
|
6609
6123
|
*
|
|
6610
|
-
* @
|
|
6124
|
+
* @remarks
|
|
6125
|
+
* Pass these to {@link discoverPlaces}, which selects the request variant from the params it is given:
|
|
6126
|
+
* a `route` property dispatches to along-route search, a `geometries` property to geometry search,
|
|
6127
|
+
* and neither to fuzzy search.
|
|
6128
|
+
*
|
|
6129
|
+
* - `detourTime`: Sort by additional travel time required to visit the POI (default)
|
|
6130
|
+
* - `detourOffset`: Sort by how far along the route the detour point falls
|
|
6131
|
+
*
|
|
6132
|
+
* @group Along Route Search
|
|
6611
6133
|
*/
|
|
6612
|
-
type
|
|
6134
|
+
type AlongRouteSortBy = 'detourTime' | 'detourOffset';
|
|
6613
6135
|
/**
|
|
6614
|
-
*
|
|
6136
|
+
* Parameters for searching places along a route.
|
|
6615
6137
|
*
|
|
6616
|
-
*
|
|
6617
|
-
*
|
|
6138
|
+
* Along-route search finds POIs near a provided route geometry and ranks them
|
|
6139
|
+
* by the detour cost (time or distance offset) required to visit them.
|
|
6618
6140
|
*
|
|
6619
|
-
* @
|
|
6141
|
+
* @remarks
|
|
6142
|
+
* **Key Features:**
|
|
6143
|
+
* - Search for POIs within a detour budget from the route
|
|
6144
|
+
* - Sort results by detour time or route offset
|
|
6145
|
+
* - Combine with POI category and brand filters
|
|
6146
|
+
* - Use directly with a {@link calculateRoute} result
|
|
6147
|
+
*
|
|
6148
|
+
* **Use Cases:**
|
|
6149
|
+
* - Find fuel stations or EV chargers along a trip
|
|
6150
|
+
* - Locate rest stops or restaurants near a route
|
|
6151
|
+
* - Surface services reachable within a time budget
|
|
6152
|
+
*
|
|
6153
|
+
* @example
|
|
6154
|
+
* ```typescript
|
|
6155
|
+
* // Find coffee shops within a 5-minute detour from a route
|
|
6156
|
+
* const results = await discoverPlaces({
|
|
6157
|
+
* route: routeResult.features[0],
|
|
6158
|
+
* maxDetourTimeSeconds: 300,
|
|
6159
|
+
* query: 'coffee',
|
|
6160
|
+
* });
|
|
6161
|
+
*
|
|
6162
|
+
* // Find EV charging stations using a plain coordinate array
|
|
6163
|
+
* const chargers = await discoverPlaces({
|
|
6164
|
+
* route: [[4.9, 52.37], [4.95, 52.28], [5.1, 52.09]],
|
|
6165
|
+
* maxDetourTimeSeconds: 600,
|
|
6166
|
+
* filters: { poiCategories: ['CHARGING_LOCATION'] },
|
|
6167
|
+
* sortBy: 'detourOffset',
|
|
6168
|
+
* });
|
|
6169
|
+
* ```
|
|
6170
|
+
*
|
|
6171
|
+
* @group Along Route Search
|
|
6620
6172
|
*/
|
|
6621
|
-
type
|
|
6173
|
+
type AlongRouteSearchParams = CommonSearchParams<AlongRouteSearchRequestAPI, AlongRouteSearchResponseAPI> & {
|
|
6174
|
+
/**
|
|
6175
|
+
* Route geometry to search along.
|
|
6176
|
+
*
|
|
6177
|
+
* Accepts any of three forms:
|
|
6178
|
+
* - **`Route`** feature as returned by {@link calculateRoute} (most common)
|
|
6179
|
+
* - **`LineString`** GeoJSON geometry object
|
|
6180
|
+
* - **`Position[]`** — a plain array of `[longitude, latitude]` coordinate pairs
|
|
6181
|
+
*
|
|
6182
|
+
* Coordinates must always be in `[longitude, latitude]` order.
|
|
6183
|
+
*
|
|
6184
|
+
* @example
|
|
6185
|
+
* ```typescript
|
|
6186
|
+
* // Route Feature from calculateRoute (most common)
|
|
6187
|
+
* route: routeResult.features[0]
|
|
6188
|
+
*
|
|
6189
|
+
* // GeoJSON LineString geometry
|
|
6190
|
+
* route: routeResult.features[0].geometry
|
|
6191
|
+
*
|
|
6192
|
+
* // Plain coordinate array
|
|
6193
|
+
* route: [[4.9, 52.37], [4.95, 52.28], [5.1, 52.09]]
|
|
6194
|
+
* ```
|
|
6195
|
+
*/
|
|
6196
|
+
route: LineString | Route | Position[];
|
|
6197
|
+
/**
|
|
6198
|
+
* Maximum allowed detour time in seconds.
|
|
6199
|
+
*
|
|
6200
|
+
* Only POIs reachable within this additional travel time from the route
|
|
6201
|
+
* will be returned. Controls the width of the search corridor.
|
|
6202
|
+
*
|
|
6203
|
+
* @example
|
|
6204
|
+
* ```typescript
|
|
6205
|
+
* maxDetourTimeSeconds: 300 // 5-minute detour budget
|
|
6206
|
+
* ```
|
|
6207
|
+
*/
|
|
6208
|
+
maxDetourTimeSeconds: number;
|
|
6622
6209
|
/**
|
|
6623
|
-
*
|
|
6210
|
+
* Sort order for the results.
|
|
6624
6211
|
*
|
|
6625
|
-
*
|
|
6626
|
-
* (e.g., as coordinates, nearby search, what3words, or bookmark).
|
|
6212
|
+
* @default 'detourTime'
|
|
6627
6213
|
*
|
|
6628
|
-
* @
|
|
6629
|
-
*
|
|
6630
|
-
*
|
|
6214
|
+
* @example
|
|
6215
|
+
* ```typescript
|
|
6216
|
+
* sortBy: 'detourOffset' // order by position along the route
|
|
6217
|
+
* ```
|
|
6631
6218
|
*/
|
|
6632
|
-
|
|
6219
|
+
sortBy?: AlongRouteSortBy;
|
|
6633
6220
|
};
|
|
6221
|
+
//#endregion
|
|
6222
|
+
//#region src/fuzzy-search/types/fuzzySearchResponse.d.ts
|
|
6634
6223
|
/**
|
|
6635
6224
|
* Union type for all possible query intents.
|
|
6636
6225
|
*
|
|
@@ -6888,7 +6477,7 @@ type NearbyIntentDetailsAPI = Omit<NearbyIntentDetails, 'position'> & {
|
|
|
6888
6477
|
* @remarks
|
|
6889
6478
|
* Pass these to {@link discoverPlaces}, which selects the request variant from the params it is given:
|
|
6890
6479
|
* a `route` property dispatches to along-route search, a `geometries` property to geometry search,
|
|
6891
|
-
* and neither to fuzzy search.
|
|
6480
|
+
* and neither to fuzzy search.
|
|
6892
6481
|
*
|
|
6893
6482
|
* **Key Features:**
|
|
6894
6483
|
* - Tolerates typos and spelling mistakes
|
|
@@ -6907,14 +6496,12 @@ type NearbyIntentDetailsAPI = Omit<NearbyIntentDetails, 'position'> & {
|
|
|
6907
6496
|
* ```typescript
|
|
6908
6497
|
* // Basic fuzzy search
|
|
6909
6498
|
* const params: FuzzySearchParams = {
|
|
6910
|
-
* key: 'your-api-key',
|
|
6911
6499
|
* query: 'pizz', // Will find "pizza" restaurants
|
|
6912
6500
|
* geoBias: { position: [4.9041, 52.3676] }
|
|
6913
6501
|
* };
|
|
6914
6502
|
*
|
|
6915
6503
|
* // Fuzzy search with custom fuzziness
|
|
6916
6504
|
* const customParams: FuzzySearchParams = {
|
|
6917
|
-
* key: 'your-api-key',
|
|
6918
6505
|
* query: 'restaurnt', // Misspelled "restaurant"
|
|
6919
6506
|
* minFuzzyLevel: 1,
|
|
6920
6507
|
* maxFuzzyLevel: 3,
|
|
@@ -6979,20 +6566,272 @@ type FuzzySearchParams = CommonSearchParams<GetObject, FuzzySearchResponseAPI> &
|
|
|
6979
6566
|
maxFuzzyLevel?: number;
|
|
6980
6567
|
};
|
|
6981
6568
|
//#endregion
|
|
6569
|
+
//#region src/geometry-search/types/geometrySearchRequestAPI.d.ts
|
|
6570
|
+
/**
|
|
6571
|
+
* @ignore
|
|
6572
|
+
*/
|
|
6573
|
+
type PolygonAPI = {
|
|
6574
|
+
type: 'POLYGON';
|
|
6575
|
+
vertices: string[];
|
|
6576
|
+
};
|
|
6577
|
+
/**
|
|
6578
|
+
* @ignore
|
|
6579
|
+
*/
|
|
6580
|
+
type CircleAPI = {
|
|
6581
|
+
type: 'CIRCLE';
|
|
6582
|
+
position: string;
|
|
6583
|
+
radius: number;
|
|
6584
|
+
};
|
|
6585
|
+
/**
|
|
6586
|
+
* @ignore
|
|
6587
|
+
*/
|
|
6588
|
+
type GeometryAPI = PolygonAPI | CircleAPI;
|
|
6589
|
+
/**
|
|
6590
|
+
* @ignore
|
|
6591
|
+
*/
|
|
6592
|
+
type GeometrySearchPayloadAPI = {
|
|
6593
|
+
geometryList: GeometryAPI[];
|
|
6594
|
+
};
|
|
6595
|
+
/**
|
|
6596
|
+
* Geometry search request type.
|
|
6597
|
+
* @ignore
|
|
6598
|
+
*/
|
|
6599
|
+
type GeometrySearchRequestAPI = PostObject<GeometrySearchPayloadAPI>;
|
|
6600
|
+
//#endregion
|
|
6601
|
+
//#region src/geometry-search/types/geometrySearchResponseAPI.d.ts
|
|
6602
|
+
/**
|
|
6603
|
+
* @ignore
|
|
6604
|
+
*/
|
|
6605
|
+
type GeometrySearchResultAPI = CommonSearchPlaceResultAPI;
|
|
6606
|
+
/**
|
|
6607
|
+
* @ignore
|
|
6608
|
+
*/
|
|
6609
|
+
type GeometrySearchResponseAPI = {
|
|
6610
|
+
/**
|
|
6611
|
+
* Summary information about the search that was performed.
|
|
6612
|
+
*/
|
|
6613
|
+
summary: SummaryAPI$1;
|
|
6614
|
+
/**
|
|
6615
|
+
* The result list, sorted in descending order by score.
|
|
6616
|
+
*/
|
|
6617
|
+
results: GeometrySearchResultAPI[];
|
|
6618
|
+
};
|
|
6619
|
+
//#endregion
|
|
6620
|
+
//#region src/geometry-search/types/geometrySearchParams.d.ts
|
|
6621
|
+
/**
|
|
6622
|
+
* Parameters for searching places within specific geographic areas (geometry search).
|
|
6623
|
+
*
|
|
6624
|
+
* Geometry search finds places that fall within or near the boundaries of one or more
|
|
6625
|
+
* geometric shapes (polygons, circles, or multipolygons). This enables area-based searches
|
|
6626
|
+
* like "restaurants in this neighborhood" or "hotels within these city boundaries".
|
|
6627
|
+
*
|
|
6628
|
+
* @remarks
|
|
6629
|
+
* Pass these to {@link discoverPlaces}, which selects the request variant from the params it is given:
|
|
6630
|
+
* a `route` property dispatches to along-route search, a `geometries` property to geometry search,
|
|
6631
|
+
* and neither to fuzzy search.
|
|
6632
|
+
*
|
|
6633
|
+
* **Key Features:**
|
|
6634
|
+
* - Search within multiple geometries simultaneously
|
|
6635
|
+
* - Supports polygons, multipolygons, and circles
|
|
6636
|
+
* - Can use geometries from previous search results
|
|
6637
|
+
* - Combines with text queries for filtered results
|
|
6638
|
+
*
|
|
6639
|
+
* **Use Cases:**
|
|
6640
|
+
* - Find POIs within administrative boundaries
|
|
6641
|
+
* - Search within custom drawn areas on map
|
|
6642
|
+
* - Filter results to specific neighborhoods or regions
|
|
6643
|
+
* - Proximity searches using circles
|
|
6644
|
+
*
|
|
6645
|
+
* @example
|
|
6646
|
+
* ```typescript
|
|
6647
|
+
* // Search within a circular area
|
|
6648
|
+
* const results = await discoverPlaces({
|
|
6649
|
+
* query: 'restaurant',
|
|
6650
|
+
* geometries: [{
|
|
6651
|
+
* type: 'Circle',
|
|
6652
|
+
* coordinates: [4.9041, 52.3676],
|
|
6653
|
+
* radius: 1000 // meters
|
|
6654
|
+
* }]
|
|
6655
|
+
* });
|
|
6656
|
+
* ```
|
|
6657
|
+
*
|
|
6658
|
+
* @example
|
|
6659
|
+
* ```typescript
|
|
6660
|
+
* // Search within a polygon
|
|
6661
|
+
* const results = await discoverPlaces({
|
|
6662
|
+
* query: 'parking',
|
|
6663
|
+
* geometries: [{
|
|
6664
|
+
* type: 'Polygon',
|
|
6665
|
+
* coordinates: [[
|
|
6666
|
+
* [4.88, 52.36],
|
|
6667
|
+
* [4.90, 52.36],
|
|
6668
|
+
* [4.90, 52.38],
|
|
6669
|
+
* [4.88, 52.38],
|
|
6670
|
+
* [4.88, 52.36]
|
|
6671
|
+
* ]]
|
|
6672
|
+
* }]
|
|
6673
|
+
* });
|
|
6674
|
+
* ```
|
|
6675
|
+
*
|
|
6676
|
+
* @group Places Search
|
|
6677
|
+
*/
|
|
6678
|
+
type GeometrySearchParams = CommonSearchParams<GeometrySearchRequestAPI, GeometrySearchResponseAPI> & {
|
|
6679
|
+
/**
|
|
6680
|
+
* List of geometries to search within.
|
|
6681
|
+
*
|
|
6682
|
+
* Can be a mix of polygons, multipolygons, circles, or geometry feature collections
|
|
6683
|
+
* from previous search results. Places that fall within or near these geometries
|
|
6684
|
+
* will be returned.
|
|
6685
|
+
*
|
|
6686
|
+
* @remarks
|
|
6687
|
+
* Also referred to as "geometryList" in API documentation.
|
|
6688
|
+
*
|
|
6689
|
+
* **Supported Types:**
|
|
6690
|
+
* - {@link Circle} - Circular search area with radius
|
|
6691
|
+
* - `Polygon` - Custom polygon boundary (GeoJSON)
|
|
6692
|
+
* - `MultiPolygon` - Multiple polygon areas (GeoJSON)
|
|
6693
|
+
* - `PolygonFeatures` - Feature collection with polygon geometries
|
|
6694
|
+
*
|
|
6695
|
+
* @example
|
|
6696
|
+
* ```typescript
|
|
6697
|
+
* // Multiple geometries
|
|
6698
|
+
* geometries: [
|
|
6699
|
+
* { type: 'Circle', coordinates: [4.9, 52.3], radius: 500 },
|
|
6700
|
+
* { type: 'Polygon', coordinates: [[...]] }
|
|
6701
|
+
* ]
|
|
6702
|
+
* ```
|
|
6703
|
+
*/
|
|
6704
|
+
geometries: SearchGeometryInput[];
|
|
6705
|
+
};
|
|
6706
|
+
/**
|
|
6707
|
+
* Circular search geometry (non-standard GeoJSON extension).
|
|
6708
|
+
*
|
|
6709
|
+
* Defines a circular search area by center point and radius. This is a convenience
|
|
6710
|
+
* type since standard GeoJSON does not include circles.
|
|
6711
|
+
*
|
|
6712
|
+
* @remarks
|
|
6713
|
+
* **Note:** This is not part of the official GeoJSON specification. It's a Maps SDK
|
|
6714
|
+
* extension that gets converted to the appropriate API format internally.
|
|
6715
|
+
*
|
|
6716
|
+
* **Coordinate Format:** `[longitude, latitude]` (standard GeoJSON order)
|
|
6717
|
+
*
|
|
6718
|
+
* @example
|
|
6719
|
+
* ```typescript
|
|
6720
|
+
* const circle: Circle = {
|
|
6721
|
+
* type: 'Circle',
|
|
6722
|
+
* coordinates: [4.9041, 52.3676], // Amsterdam center
|
|
6723
|
+
* radius: 2000 // 2km radius
|
|
6724
|
+
* };
|
|
6725
|
+
* ```
|
|
6726
|
+
*
|
|
6727
|
+
* @group Places Search
|
|
6728
|
+
*/
|
|
6729
|
+
interface Circle {
|
|
6730
|
+
/**
|
|
6731
|
+
* Geometry type identifier.
|
|
6732
|
+
* Must be the literal string `'Circle'`.
|
|
6733
|
+
*/
|
|
6734
|
+
type: 'Circle';
|
|
6735
|
+
/**
|
|
6736
|
+
* Center point of the circle in `[longitude, latitude]` format.
|
|
6737
|
+
*
|
|
6738
|
+
* @example [4.9041, 52.3676]
|
|
6739
|
+
*/
|
|
6740
|
+
coordinates: Position;
|
|
6741
|
+
/**
|
|
6742
|
+
* Radius of the circle in meters.
|
|
6743
|
+
*
|
|
6744
|
+
* @remarks
|
|
6745
|
+
* Defines the search area around the center point. Places within or near
|
|
6746
|
+
* this radius will be included in results.
|
|
6747
|
+
*
|
|
6748
|
+
* @example 1000 // 1 kilometer
|
|
6749
|
+
*/
|
|
6750
|
+
radius: number;
|
|
6751
|
+
}
|
|
6752
|
+
/**
|
|
6753
|
+
* Union type of all supported geometry search input formats.
|
|
6754
|
+
*
|
|
6755
|
+
* Accepts standard GeoJSON polygons/multipolygons, custom circles, or polygon
|
|
6756
|
+
* feature collections (such as those returned from previous searches or the
|
|
6757
|
+
* geometry data service).
|
|
6758
|
+
*
|
|
6759
|
+
* @remarks
|
|
6760
|
+
* **Flexibility:**
|
|
6761
|
+
* - Mix different geometry types in a single search
|
|
6762
|
+
* - Use results from {@link geometryData} directly
|
|
6763
|
+
* - Pass search results with geometries as boundaries
|
|
6764
|
+
* - Define custom polygons for precise area searches
|
|
6765
|
+
*
|
|
6766
|
+
* @example
|
|
6767
|
+
* ```typescript
|
|
6768
|
+
* // Using different geometry types
|
|
6769
|
+
* const geometries: SearchGeometryInput[] = [
|
|
6770
|
+
* // Circle
|
|
6771
|
+
* { type: 'Circle', coordinates: [4.9, 52.3], radius: 1000 },
|
|
6772
|
+
*
|
|
6773
|
+
* // Polygon
|
|
6774
|
+
* {
|
|
6775
|
+
* type: 'Polygon',
|
|
6776
|
+
* coordinates: [[
|
|
6777
|
+
* [4.88, 52.36], [4.90, 52.36], [4.90, 52.38], [4.88, 52.38], [4.88, 52.36]
|
|
6778
|
+
* ]]
|
|
6779
|
+
* },
|
|
6780
|
+
*
|
|
6781
|
+
* // From previous geometry data call
|
|
6782
|
+
* cityBoundaries // PolygonFeatures
|
|
6783
|
+
* ];
|
|
6784
|
+
* ```
|
|
6785
|
+
*
|
|
6786
|
+
* @group Places Search
|
|
6787
|
+
*/
|
|
6788
|
+
type SearchGeometryInput = Polygon | MultiPolygon | Circle | PolygonFeatures;
|
|
6789
|
+
//#endregion
|
|
6982
6790
|
//#region src/search/discoverPlaces.d.ts
|
|
6983
6791
|
type SearchFeatureCollectionProps = SearchSummary & {
|
|
6984
6792
|
queryIntent?: QueryIntent[];
|
|
6985
6793
|
};
|
|
6986
6794
|
/** The keys of `Params` that `Base` lacks, each forbidden. */
|
|
6987
6795
|
type Without<Params, Base> = { [Key in Exclude<keyof Params, keyof Base>]?: never; };
|
|
6796
|
+
/**
|
|
6797
|
+
* What {@link discoverPlaces} adds to its search variant's `filters`: the POI categories as codes in
|
|
6798
|
+
* `poiCategories`, or in words with `poiCategoryQuery`, never both.
|
|
6799
|
+
*
|
|
6800
|
+
* @group Places Search
|
|
6801
|
+
*/
|
|
6802
|
+
export type DiscoverPlacesCategoryFilters = {
|
|
6803
|
+
poiCategoryQuery?: never;
|
|
6804
|
+
} | {
|
|
6805
|
+
/**
|
|
6806
|
+
* Categories in words — `'sushi'`, `['gym', 'ev charging']` — kept as the POI categories they name.
|
|
6807
|
+
*
|
|
6808
|
+
* @remarks
|
|
6809
|
+
* Resolved with {@link resolvePOICategories} in the call's `language`, whose codes become the search's
|
|
6810
|
+
* `poiCategories`. The category list costs one request per language and session. A word nothing
|
|
6811
|
+
* matches is left out; when none matches, the call rejects with {@link SDKError} and sends no search.
|
|
6812
|
+
*
|
|
6813
|
+
* @example
|
|
6814
|
+
* ```typescript
|
|
6815
|
+
* const sushi = await discoverPlaces({
|
|
6816
|
+
* filters: { poiCategoryQuery: 'sushi' },
|
|
6817
|
+
* geoBias: { position: [4.9041, 52.3676] },
|
|
6818
|
+
* });
|
|
6819
|
+
* ```
|
|
6820
|
+
*/
|
|
6821
|
+
poiCategoryQuery: string | string[];
|
|
6822
|
+
poiCategories?: never;
|
|
6823
|
+
};
|
|
6988
6824
|
/**
|
|
6989
6825
|
* What {@link discoverPlaces} takes: one search variant's params, with the other variants' own
|
|
6990
|
-
* options forbidden
|
|
6991
|
-
* dropped, as it would be
|
|
6826
|
+
* options forbidden, and {@link DiscoverPlacesCategoryFilters} added to `filters`. So
|
|
6827
|
+
* `{ geometries, cursor }` is a compile error rather than a cursor silently dropped, as it would be
|
|
6828
|
+
* with a plain union.
|
|
6992
6829
|
*
|
|
6993
6830
|
* @group Places Search
|
|
6994
6831
|
*/
|
|
6995
|
-
export type DiscoverPlacesParams =
|
|
6832
|
+
export type DiscoverPlacesParams = {
|
|
6833
|
+
filters?: DiscoverPlacesCategoryFilters;
|
|
6834
|
+
} & ((FuzzySearchParams & Without<GeometrySearchParams, FuzzySearchParams> & Without<AlongRouteSearchParams, FuzzySearchParams>) | (GeometrySearchParams & Without<FuzzySearchParams, GeometrySearchParams> & Without<AlongRouteSearchParams, GeometrySearchParams> & {
|
|
6996
6835
|
filters?: {
|
|
6997
6836
|
countries?: never;
|
|
6998
6837
|
};
|
|
@@ -7000,7 +6839,7 @@ export type DiscoverPlacesParams = (FuzzySearchParams & Without<GeometrySearchPa
|
|
|
7000
6839
|
filters?: {
|
|
7001
6840
|
countries?: never;
|
|
7002
6841
|
};
|
|
7003
|
-
});
|
|
6842
|
+
}));
|
|
7004
6843
|
/**
|
|
7005
6844
|
* Search service response containing places that match the query.
|
|
7006
6845
|
*
|
|
@@ -7010,11 +6849,12 @@ export type DiscoverPlacesParams = (FuzzySearchParams & Without<GeometrySearchPa
|
|
|
7010
6849
|
*/
|
|
7011
6850
|
export type DiscoverPlacesResponse = Places<SearchPlaceProps, SearchFeatureCollectionProps>;
|
|
7012
6851
|
/**
|
|
7013
|
-
* Universal search function for finding places by text query or
|
|
6852
|
+
* Universal search function for finding places by text query, within geometries or along a route.
|
|
7014
6853
|
*
|
|
7015
|
-
*
|
|
7016
|
-
* - **
|
|
7017
|
-
* - **
|
|
6854
|
+
* Runs one of three searches, picked from its params:
|
|
6855
|
+
* - **Along-route search** when `route` is given: places within a detour budget of the route
|
|
6856
|
+
* - **Geometry search** when `geometries` is given: places inside those areas
|
|
6857
|
+
* - **Fuzzy search** otherwise: free text, optionally biased by `geoBias`
|
|
7018
6858
|
*
|
|
7019
6859
|
* @remarks
|
|
7020
6860
|
* The search service provides:
|
|
@@ -7051,6 +6891,12 @@ export type DiscoverPlacesResponse = Places<SearchPlaceProps, SearchFeatureColle
|
|
|
7051
6891
|
* filters: { poiCategories: ['ITALIAN_RESTAURANT'] },
|
|
7052
6892
|
* geoBias: { position: [4.9041, 52.3676], radiusMeters: 5000 } // Within 5km
|
|
7053
6893
|
* });
|
|
6894
|
+
*
|
|
6895
|
+
* // The same, from a category in words
|
|
6896
|
+
* const italian = await discoverPlaces({
|
|
6897
|
+
* filters: { poiCategoryQuery: 'italian food' },
|
|
6898
|
+
* geoBias: { position: [4.9041, 52.3676], radiusMeters: 5000 }
|
|
6899
|
+
* });
|
|
7054
6900
|
* ```
|
|
7055
6901
|
*
|
|
7056
6902
|
* @see [Search API Documentation](https://docs.tomtom.com/search-api/documentation/search-service/search-service)
|
|
@@ -7220,7 +7066,6 @@ type SearchSuggestionsParams = CommonServiceParams & {
|
|
|
7220
7066
|
* measured from.
|
|
7221
7067
|
*/
|
|
7222
7068
|
origin?: HasLngLat;
|
|
7223
|
-
view?: View;
|
|
7224
7069
|
};
|
|
7225
7070
|
/**
|
|
7226
7071
|
* The result of a {@link getSearchSuggestions} call.
|
|
@@ -7770,4 +7615,4 @@ type TrafficIncidentDetailsParams = TrafficIncidentDetailsByBBoxParams | Traffic
|
|
|
7770
7615
|
*/
|
|
7771
7616
|
export declare const trafficIncidentDetails: (params: TrafficIncidentDetailsParams) => Promise<TrafficIncidentDetails>;
|
|
7772
7617
|
//#endregion
|
|
7773
|
-
export type { AdditionalDataAPI, AlongRouteSearchParams,
|
|
7618
|
+
export type { AdditionalDataAPI, AlongRouteSearchParams, AlongRouteSortBy, AreaAnalyticsDateInput, ArrivalSide, BookmarkIntent, BookmarkIntentDetails, BrandSuggestion, CalculateRouteParams, CategorySuggestion, ChargingStationsAvailabilityParams, ChargingStopsStrategy, Circle, CommonServiceParamsWithZoom, ComputeTravelTimeFor, CoordinateIntent, CoordinateIntentDetails, ExtendedRouteRepresentation, FunctionalRoadClass, FuzzySearchParams, GeocodingParams, GeocodingProps, GeocodingResponse, GeometriesInput, GeometryDataParams, GeometryDataResponseAPI, GeometryParams, GeometryPlaceParams, GeometrySearchParams, GuidanceParams, InputSectionType, InputSectionTypes, LegCostModel, MaxNumberOfAlternatives, NearbyIntent, NearbyIntentDetails, POICategoriesParams, POICategoriesResponse, POICategoryResult, PlaceDetailsMandatoryParams, PlaceDetailsOptionalParams, PlaceDetailsParams, PlaceDetailsResponse, PlaceDetailsResponseAPI, PlaceDetailsResultAPI, PlaceSuggestion, PlacesWithEVAvailabilityOptions, PoiCategoriesResponseAPI, PoiCategoryAPI, QueryIntent, RefinementSuggestion, ResolvePOICategoriesParams, ResolvedPOICategories, ReverseGeocodingMandatoryParams, ReverseGeocodingOptionalParams, ReverseGeocodingParams, RouteStopOptions, SearchGeometryInput, SearchSuggestion, SearchSuggestionKind, SearchSuggestionsParams, SearchSuggestionsResponse, TrafficAreaAnalyticsDateRange, TrafficAreaAnalyticsDays, TrafficAreaAnalyticsParams, TrafficIncidentDetailsByBBoxParams, TrafficIncidentDetailsByIdsParams, TrafficIncidentDetailsByPolygonParams, TrafficIncidentDetailsParams, W3WIntent, W3WIntentDetails, arrivalSides, chargingStopsStrategies, functionalRoadClasses };
|