@tomtom-org/maps-sdk 0.46.9 → 0.46.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/core/dist/core.es.js +1 -1
- package/core/dist/core.es.js.map +1 -1
- package/core/dist/index.d.ts +44 -12
- package/map/dist/index.d.ts +1277 -550
- package/map/dist/map.es.js +1 -2
- package/map/dist/map.es.js.map +1 -1
- package/map/package.json +1 -1
- package/package.json +4 -4
- package/services/dist/index.d.ts +28 -32
- package/services/dist/services.es.js +1 -1
- package/services/dist/services.es.js.map +1 -1
package/core/dist/index.d.ts
CHANGED
|
@@ -201,7 +201,7 @@ export declare type AreaAnalyticsCollectionProperties = {
|
|
|
201
201
|
/**
|
|
202
202
|
* Traffic metrics included in the report.
|
|
203
203
|
*/
|
|
204
|
-
|
|
204
|
+
metrics: AreaAnalyticsMetricKey[];
|
|
205
205
|
/**
|
|
206
206
|
* Whether tile-level heatmap data is included.
|
|
207
207
|
*/
|
|
@@ -210,15 +210,13 @@ export declare type AreaAnalyticsCollectionProperties = {
|
|
|
210
210
|
* Functional road classes included in the analysis (0–8).
|
|
211
211
|
*/
|
|
212
212
|
frcs: number[];
|
|
213
|
+
/**
|
|
214
|
+
* Data-driven min/max value ranges computed from all tile entries.
|
|
215
|
+
* Only metrics present in the tile data will have a range entry.
|
|
216
|
+
*/
|
|
217
|
+
ranges: Partial<Record<AreaAnalyticsMetricKey, AreaAnalyticsMetricRange>>;
|
|
213
218
|
};
|
|
214
219
|
|
|
215
|
-
/**
|
|
216
|
-
* Available traffic analytical metrics for area analytics reports.
|
|
217
|
-
*
|
|
218
|
-
* @group Traffic
|
|
219
|
-
*/
|
|
220
|
-
export declare type AreaAnalyticsDataType = 'NETWORK_LENGTH' | 'CONGESTION_LEVEL' | 'FREE_FLOW_SPEED' | 'TRAVEL_TIME' | 'SPEED';
|
|
221
|
-
|
|
222
220
|
/**
|
|
223
221
|
* A single region feature in the area analytics result.
|
|
224
222
|
*
|
|
@@ -229,6 +227,10 @@ export declare type AreaAnalyticsFeature = Omit<Feature<Polygon, AreaAnalyticsFe
|
|
|
229
227
|
* Unique identifier for this feature.
|
|
230
228
|
*/
|
|
231
229
|
id: string;
|
|
230
|
+
/**
|
|
231
|
+
* Bounding box for this area analytics feature.
|
|
232
|
+
*/
|
|
233
|
+
bbox: BBox;
|
|
232
234
|
};
|
|
233
235
|
|
|
234
236
|
/**
|
|
@@ -264,16 +266,40 @@ export declare type AreaAnalyticsFeatureProperties = {
|
|
|
264
266
|
tiles: AreaAnalyticsTileEntry[];
|
|
265
267
|
};
|
|
266
268
|
/**
|
|
267
|
-
* Detected anomalies keyed by
|
|
269
|
+
* Detected anomalies keyed by metric, if anomaly detection was performed.
|
|
268
270
|
*/
|
|
269
|
-
anomalies?: Partial<Record<
|
|
271
|
+
anomalies?: Partial<Record<AreaAnalyticsMetricKey, AreaAnalyticsAnomaly[]>>;
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Identifies a single traffic metric — a key of {@link AreaAnalyticsMetrics}.
|
|
276
|
+
*
|
|
277
|
+
* @group Traffic
|
|
278
|
+
*/
|
|
279
|
+
export declare type AreaAnalyticsMetricKey = (typeof areaAnalyticsMetricKeys)[number];
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* All traffic metric identifiers, ordered consistently across the SDK.
|
|
283
|
+
*
|
|
284
|
+
* @group Traffic
|
|
285
|
+
*/
|
|
286
|
+
export declare const areaAnalyticsMetricKeys: readonly ["speed", "freeFlowSpeed", "congestionLevel", "travelTime", "networkLength"];
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Min/max value range for a single traffic metric across all tiles.
|
|
290
|
+
*
|
|
291
|
+
* @group Traffic
|
|
292
|
+
*/
|
|
293
|
+
export declare type AreaAnalyticsMetricRange = {
|
|
294
|
+
min: number;
|
|
295
|
+
max: number;
|
|
270
296
|
};
|
|
271
297
|
|
|
272
298
|
/**
|
|
273
299
|
* Traffic metric values for an area or time period.
|
|
274
300
|
*
|
|
275
301
|
* @remarks
|
|
276
|
-
* All fields are optional — only metrics included in the requested `
|
|
302
|
+
* All fields are optional — only metrics included in the requested `metrics` will be present.
|
|
277
303
|
*
|
|
278
304
|
* @group Traffic
|
|
279
305
|
*/
|
|
@@ -305,6 +331,11 @@ export declare type AreaAnalyticsMetrics = {
|
|
|
305
331
|
/**
|
|
306
332
|
* Traffic metrics for a single geographic tile within the analysis region.
|
|
307
333
|
*
|
|
334
|
+
* @remarks
|
|
335
|
+
* All fields are optional — only metrics included in the requested `metrics` will be present.
|
|
336
|
+
* `networkLength` here represents the total length of road segments **within that tile** (meters),
|
|
337
|
+
* not the region aggregate.
|
|
338
|
+
*
|
|
308
339
|
* @group Traffic
|
|
309
340
|
*/
|
|
310
341
|
export declare type AreaAnalyticsTileEntry = AreaAnalyticsMetrics & {
|
|
@@ -4925,7 +4956,7 @@ export declare const toPointGeometry: (coordinates: Position) => Point;
|
|
|
4925
4956
|
* endDate: new Date('2024-08-06'),
|
|
4926
4957
|
* frcs: [0, 1, 2, 3],
|
|
4927
4958
|
* hours: [7, 8, 9],
|
|
4928
|
-
*
|
|
4959
|
+
* metrics: ['speed', 'congestionLevel'],
|
|
4929
4960
|
* feature: {
|
|
4930
4961
|
* type: 'Feature',
|
|
4931
4962
|
* geometry: {
|
|
@@ -4938,6 +4969,7 @@ export declare const toPointGeometry: (coordinates: Position) => Point;
|
|
|
4938
4969
|
*
|
|
4939
4970
|
* console.log(result.properties.startDate); // Date object: 2024-08-06T00:00:00.000Z
|
|
4940
4971
|
* result.features[0].properties.baseData.speed; // avg speed in km/h
|
|
4972
|
+
* result.properties.ranges.congestionLevel; // { min: 3, max: 42 } — data-driven range across all tiles
|
|
4941
4973
|
* ```
|
|
4942
4974
|
*
|
|
4943
4975
|
* @group Traffic
|