@tomtom-org/maps-sdk 0.45.5 → 0.45.7

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.
@@ -35,7 +35,9 @@ import { Places } from '@tomtom-org/maps-sdk/core';
35
35
  import { Places as Places_2 } from '@tomtom-org/maps-sdk/core';
36
36
  import { POICategory } from '@tomtom-org/maps-sdk/core';
37
37
  import { Point } from 'geojson';
38
+ import { PolygonFeature } from '@tomtom-org/maps-sdk/core';
38
39
  import { PolygonFeatures } from '@tomtom-org/maps-sdk/core';
40
+ import { PolygonFeatures as PolygonFeatures_2 } from '@tomtom-org/maps-sdk/core';
39
41
  import { Position } from 'geojson';
40
42
  import { Route } from '@tomtom-org/maps-sdk/core';
41
43
  import { RouteProps } from '@tomtom-org/maps-sdk/core';
@@ -46,6 +48,7 @@ import { Source } from 'maplibre-gl';
46
48
  import { SourceSpecification } from 'maplibre-gl';
47
49
  import { StyleSpecification } from 'maplibre-gl';
48
50
  import { SymbolLayerSpecification } from 'maplibre-gl';
51
+ import { TrafficIncidentCategory } from '@tomtom-org/maps-sdk/core';
49
52
  import { TrafficSectionProps } from '@tomtom-org/maps-sdk/core';
50
53
  import { Waypoint } from '@tomtom-org/maps-sdk/core';
51
54
  import { WaypointLike } from '@tomtom-org/maps-sdk/core';
@@ -965,6 +968,31 @@ declare type BaseSourceAndLayers = {
965
968
  */
966
969
  export declare const buildPlaceTitle: (place: Place) => string;
967
970
 
971
+ /**
972
+ * Attaches labels and applies theme-specific geometry to reachable range polygon features.
973
+ *
974
+ * Features must be ordered **largest budget first** (e.g. 30 min, 20 min, 10 min).
975
+ * For the `inverted` theme, polygons are converted to donuts and one extra innermost feature is appended.
976
+ *
977
+ * @param features Polygon features from `calculateReachableRange`, ordered largest budget first.
978
+ * @param labels Label per feature in matching order (e.g. `['30 min', '20 min', '10 min']`).
979
+ * @param theme Visual theme. Defaults to `'filled'`.
980
+ *
981
+ * @example
982
+ * ```typescript
983
+ * const features = [range30min, range20min, range10min];
984
+ * const labels = ['30 min', '20 min', '10 min'];
985
+ *
986
+ * module.show({
987
+ * type: 'FeatureCollection',
988
+ * features: buildReachableRangeFeatures(features, labels, 'inverted'),
989
+ * });
990
+ * ```
991
+ *
992
+ * @group Geometries
993
+ */
994
+ export declare const buildReachableRangeFeatures: (features: PolygonFeature[], labels: string[], theme?: GeometryTheme) => PolygonFeature[];
995
+
968
996
  /**
969
997
  * Generates the routing layers configuration for route visualization on the map.
970
998
  * @param config - Optional routing module configuration to customize layer properties.
@@ -1301,9 +1329,11 @@ export declare type CleanEventStatesOptions = {
1301
1329
  */
1302
1330
  export declare type ClickEventType = 'click' | 'contextmenu';
1303
1331
 
1304
- declare type ColorPaletteOptions = keyof typeof colorPalettes;
1332
+ export declare const colorPaletteIDs: ColorPaletteOptions[];
1333
+
1334
+ export declare type ColorPaletteOptions = keyof typeof colorPalettes;
1305
1335
 
1306
- declare const colorPalettes: {
1336
+ export declare const colorPalettes: {
1307
1337
  warm: string[];
1308
1338
  browns: string[];
1309
1339
  cold: string[];
@@ -1585,7 +1615,7 @@ export declare const defaultRoutingLayers: Required<RouteLayersConfig>;
1585
1615
  * Allows filtering incidents based on whether they cause delays and the severity of those delays.
1586
1616
  * Useful for focusing on incidents with the most significant traffic impact.
1587
1617
  *
1588
- * @group Traffic
1618
+ * @group Traffic Incidents
1589
1619
  */
1590
1620
  export declare type DelayFilter = {
1591
1621
  /**
@@ -2265,7 +2295,27 @@ export declare class EventsModule<T = MapGeoJSONFeature> {
2265
2295
  private readonly eventProxy;
2266
2296
  private readonly sourceWithLayers;
2267
2297
  private readonly config;
2268
- constructor(eventProxy: EventsProxy, sourceWithLayers: SourceWithLayers, config: EventHandlerConfig | undefined);
2298
+ /**
2299
+ * Optional function that transforms a raw {@link MapGeoJSONFeature} into the
2300
+ * feature type `T` exposed by the module. When provided, every feature passed (fired)
2301
+ * to event handlers is first run through this function, so callers receive the
2302
+ * module's own feature shape instead of the underlying MapLibre feature.
2303
+ *
2304
+ * When omitted, `T` defaults to `MapGeoJSONFeature` and features are forwarded
2305
+ * as-is.
2306
+ */
2307
+ private readonly mapping?;
2308
+ constructor(eventProxy: EventsProxy, sourceWithLayers: SourceWithLayers, config: EventHandlerConfig | undefined,
2309
+ /**
2310
+ * Optional function that transforms a raw {@link MapGeoJSONFeature} into the
2311
+ * feature type `T` exposed by the module. When provided, every feature passed (fired)
2312
+ * to event handlers is first run through this function, so callers receive the
2313
+ * module's own feature shape instead of the underlying MapLibre feature.
2314
+ *
2315
+ * When omitted, `T` defaults to `MapGeoJSONFeature` and features are forwarded
2316
+ * as-is.
2317
+ */
2318
+ mapping?: ((feature: MapGeoJSONFeature) => T) | undefined);
2269
2319
  /**
2270
2320
  * Register an event handler for user interactions with map features.
2271
2321
  *
@@ -2764,11 +2814,14 @@ export declare class GeometriesModule extends AbstractMapModule<GeometrySourcesW
2764
2814
  private titleLayerSpecs;
2765
2815
  private geometryFillLayerSpecs;
2766
2816
  private geometryOutlineLayerSpecs;
2817
+ private lineLabelLayerSpecs;
2767
2818
  private sourceID;
2768
2819
  private fillLayerID;
2769
2820
  private outlineLayerID;
2821
+ private lineLabelLayerID;
2770
2822
  private titleSourceID;
2771
2823
  private titleLayerID;
2824
+ private lastRawInput;
2772
2825
  /**
2773
2826
  * Make sure the map is ready before create an instance of the module and any other interaction with the map
2774
2827
  * @param tomtomMap The TomTomMap instance.
@@ -3142,18 +3195,61 @@ export declare type GeometriesModuleConfig = MapModuleCommonConfig & {
3142
3195
  * ```
3143
3196
  */
3144
3197
  beforeLayerConfig?: GeometryBeforeLayerConfig;
3198
+ /**
3199
+ * Line label configuration.
3200
+ *
3201
+ * When set, labels are placed along the polygon border lines.
3202
+ */
3203
+ lineLabelConfig?: GeometryLineLabelConfig;
3204
+ /**
3205
+ * Visual theme applied to all features shown by this module.
3206
+ *
3207
+ * - `'filled'` — Colored fill with thin border (default)
3208
+ * - `'outline'` — Transparent fill with thick colored border
3209
+ * - `'inverted'` — Colors the area **outside** the polygon (donut geometry)
3210
+ *
3211
+ * Individual features can override this by setting `theme` in their properties.
3212
+ *
3213
+ * @example
3214
+ * ```typescript
3215
+ * // Show the "rest of the world" outside a country
3216
+ * const module = await GeometriesModule.get(map, {
3217
+ * theme: 'inverted',
3218
+ * colorConfig: { fillColor: 'black', fillOpacity: 0.5 }
3219
+ * });
3220
+ * module.show(countryGeometry);
3221
+ * ```
3222
+ */
3223
+ theme?: GeometryTheme;
3224
+ /**
3225
+ * Transform applied to features before rendering.
3226
+ *
3227
+ * Receives the value passed to {@link GeometriesModule.show} and returns
3228
+ * features ready for display. Useful for deriving labels or other display
3229
+ * properties from domain data.
3230
+ *
3231
+ * @remarks
3232
+ * Used internally by {@link reachableRangeGeometryConfig} to generate budget
3233
+ * labels (e.g. `'30 min'`) from feature properties. For most use cases,
3234
+ * the standard config fields (`colorConfig`, `textConfig`, `theme`) suffice.
3235
+ *
3236
+ * @example
3237
+ * ```typescript
3238
+ * // Derive title from a custom property
3239
+ * const config: GeometriesModuleConfig = {
3240
+ * transformFeaturesForDisplay: (fc) => ({
3241
+ * ...fc,
3242
+ * features: fc.features.map((f) => ({
3243
+ * ...f,
3244
+ * properties: { ...f.properties, title: f.properties?.customLabel },
3245
+ * })),
3246
+ * }),
3247
+ * };
3248
+ * ```
3249
+ */
3250
+ transformFeaturesForDisplay?: (input: PolygonFeatures_2) => PolygonFeatures_2;
3145
3251
  };
3146
3252
 
3147
- /**
3148
- * @ignore
3149
- */
3150
- export declare const GEOMETRY_COLOR_PROP = "color";
3151
-
3152
- /**
3153
- * @ignore
3154
- */
3155
- export declare const GEOMETRY_TITLE_PROP = "title";
3156
-
3157
3253
  /**
3158
3254
  * Layer positioning configuration for geometries.
3159
3255
  *
@@ -3214,7 +3310,7 @@ export declare type GeometryColorConfig = {
3214
3310
  * - Color palette name (e.g., `'red'`, `'blue'`)
3215
3311
  * - MapLibre expression for data-driven styling
3216
3312
  *
3217
- * @default '#0080FF'
3313
+ * @default '#0A3653'
3218
3314
  *
3219
3315
  * @example
3220
3316
  * ```typescript
@@ -3238,7 +3334,7 @@ export declare type GeometryColorConfig = {
3238
3334
  * @remarks
3239
3335
  * Value between 0 (fully transparent) and 1 (fully opaque).
3240
3336
  *
3241
- * @default 0.3
3337
+ * @default 0.15
3242
3338
  *
3243
3339
  * @example
3244
3340
  * ```typescript
@@ -3279,7 +3375,7 @@ export declare type GeometryLineConfig = {
3279
3375
  /**
3280
3376
  * Color of the geometry border/outline.
3281
3377
  *
3282
- * @default '#0080FF'
3378
+ * @default '#0A3653'
3283
3379
  *
3284
3380
  * @example
3285
3381
  * ```typescript
@@ -3318,6 +3414,97 @@ export declare type GeometryLineConfig = {
3318
3414
  lineWidth?: DataDrivenPropertyValueSpecification<number>;
3319
3415
  };
3320
3416
 
3417
+ /**
3418
+ * Line label configuration for geometries.
3419
+ *
3420
+ * When set, a symbol layer is added to the geometry source,
3421
+ * placing labels along the polygon border lines
3422
+ *
3423
+ * @example
3424
+ * ```typescript
3425
+ * // Defaults
3426
+ * const lineLabelConfig: GeometryLineLabelConfig = {};
3427
+ *
3428
+ * // Custom appearance for dark fills
3429
+ * const lineLabelConfig: GeometryLineLabelConfig = {
3430
+ * minZoom: 10,
3431
+ * textColor: '#FFFFFF',
3432
+ * textHaloColor: '#000000',
3433
+ * textSize: 13
3434
+ * };
3435
+ * ```
3436
+ *
3437
+ * @group Geometries
3438
+ */
3439
+ export declare type GeometryLineLabelConfig = {
3440
+ /**
3441
+ * Minimum zoom level at which border labels are visible.
3442
+ *
3443
+ * @default 3
3444
+ */
3445
+ minZoom?: number;
3446
+ /**
3447
+ * Font size of the border labels in pixels.
3448
+ *
3449
+ * @default 15
3450
+ *
3451
+ * @example
3452
+ * ```typescript
3453
+ * textSize: 13
3454
+ * // Data-driven
3455
+ * textSize: ['interpolate', ['linear'], ['zoom'], 8, 12, 14, 16]
3456
+ * ```
3457
+ */
3458
+ textSize?: DataDrivenPropertyValueSpecification<number>;
3459
+ /**
3460
+ * Color of the border label text.
3461
+ *
3462
+ * @default '#333333'
3463
+ *
3464
+ * @example
3465
+ * ```typescript
3466
+ * textColor: '#FFFFFF'
3467
+ * textColor: ['get', 'labelColor']
3468
+ * ```
3469
+ */
3470
+ textColor?: DataDrivenPropertyValueSpecification<string>;
3471
+ /**
3472
+ * Color of the halo drawn around the border label text.
3473
+ *
3474
+ * The halo improves legibility against complex or dark backgrounds.
3475
+ *
3476
+ * @default '#FFFFFF'
3477
+ *
3478
+ * @example
3479
+ * ```typescript
3480
+ * textHaloColor: '#000000'
3481
+ * ```
3482
+ */
3483
+ textHaloColor?: DataDrivenPropertyValueSpecification<string>;
3484
+ /**
3485
+ * Width of the halo drawn around the border label text, in pixels.
3486
+ *
3487
+ * @default 2
3488
+ *
3489
+ * @example
3490
+ * ```typescript
3491
+ * textHaloWidth: 3
3492
+ * ```
3493
+ */
3494
+ textHaloWidth?: DataDrivenPropertyValueSpecification<number>;
3495
+ /**
3496
+ * Distance between repeated labels along the border line, in pixels.
3497
+ *
3498
+ * @default 200
3499
+ *
3500
+ * @example
3501
+ * ```typescript
3502
+ * symbolSpacing: 350
3503
+ * ```
3504
+ */
3505
+ symbolSpacing?: number;
3506
+ };
3507
+
3321
3508
  /**
3322
3509
  * IDs of sources and layers from a geometry module.
3323
3510
  */
@@ -3369,6 +3556,27 @@ export declare type GeometryTextConfig = {
3369
3556
  textField: DataDrivenPropertyValueSpecification<string>;
3370
3557
  };
3371
3558
 
3559
+ /**
3560
+ * Visual theme for polygon display with {@link GeometriesModule}.
3561
+ *
3562
+ * - `'filled'` — Colored fill with thin border (default)
3563
+ * - `'outline'` — Transparent fill with thick colored border
3564
+ * - `'inverted'` — Colors the area **outside** the polygon (donut geometry)
3565
+ *
3566
+ * Set via {@link GeometriesModuleConfig.theme} at config level, or per-feature in
3567
+ * `properties.theme`.
3568
+ *
3569
+ * @group Geometries
3570
+ */
3571
+ export declare type GeometryTheme = 'filled' | 'outline' | 'inverted';
3572
+
3573
+ /**
3574
+ * All valid {@link GeometryTheme} values.
3575
+ *
3576
+ * @group Geometries
3577
+ */
3578
+ export declare const geometryThemes: readonly ["filled", "outline", "inverted"];
3579
+
3372
3580
  /**
3373
3581
  * Gets the map style sprite image ID to display on the map for the give place.
3374
3582
  * @ignore
@@ -3650,47 +3858,6 @@ declare type HillshadeSourcesWithLayers = {
3650
3858
  */
3651
3859
  export declare type HoverEventType = 'hover' | 'hover-move' | 'long-hover';
3652
3860
 
3653
- /**
3654
- * Available traffic incident category identifiers.
3655
- *
3656
- * @remarks
3657
- * These categories classify different types of traffic incidents that can be displayed on the map.
3658
- *
3659
- * @group Traffic Incidents
3660
- */
3661
- export declare const incidentCategories: readonly ["unknown", "accident", "fog", "dangerous_conditions", "rain", "ice", "jam", "lane_closed", "road_closed", "road_works", "wind", "flooding", "broken_down_vehicle"];
3662
-
3663
- /**
3664
- * @ignore
3665
- */
3666
- export declare const incidentCategoriesMapping: Record<IncidentCategory, number>;
3667
-
3668
- /**
3669
- * Traffic incident category type.
3670
- *
3671
- * @remarks
3672
- * Represents the type of traffic incident affecting road conditions.
3673
- * Used for filtering and categorizing incidents displayed on the map.
3674
- *
3675
- * Available categories:
3676
- * - `unknown` - Unclassified incident
3677
- * - `accident` - Vehicle collision or crash
3678
- * - `fog` - Low visibility due to fog
3679
- * - `dangerous_conditions` - Hazardous road conditions
3680
- * - `rain` - Heavy rain affecting traffic
3681
- * - `ice` - Icy road conditions
3682
- * - `jam` - Traffic congestion or standstill
3683
- * - `lane_closed` - One or more lanes unavailable
3684
- * - `road_closed` - Complete road closure
3685
- * - `road_works` - Construction or maintenance
3686
- * - `wind` - Strong winds affecting traffic
3687
- * - `flooding` - Water on roadway
3688
- * - `broken_down_vehicle` - Disabled vehicle blocking traffic
3689
- *
3690
- * @group Traffic Incidents
3691
- */
3692
- export declare type IncidentCategory = (typeof incidentCategories)[number];
3693
-
3694
3861
  /**
3695
3862
  * Common configuration for traffic incident visualization components.
3696
3863
  *
@@ -5695,10 +5862,11 @@ export declare type POIsModuleConfig = MapModuleCommonConfig & {
5695
5862
  * ```
5696
5863
  *
5697
5864
  * @group POIs
5865
+ * @see https://docs.tomtom.com/map-display-api/documentation/tomtom-orbis-maps/vector/content#poi for more details on the available properties from the vector tile features
5698
5866
  */
5699
5867
  export declare type POIsModuleFeature = Omit<MapGeoJSONFeature, 'properties'> & {
5700
5868
  /**
5701
- * POI-specific properties from the vector tile.
5869
+ * POI-specific properties from the vector tile data.
5702
5870
  */
5703
5871
  properties: {
5704
5872
  /**
@@ -5728,19 +5896,9 @@ export declare type POIsModuleFeature = Omit<MapGeoJSONFeature, 'properties'> &
5728
5896
  * Used for styling and filtering purposes. Maps to a specific POI type
5729
5897
  * (e.g., RESTAURANT, HOTEL_MOTEL).
5730
5898
  *
5731
- * @example 'RESTAURANT'
5899
+ * @example 'restaurant'
5732
5900
  */
5733
5901
  category: string;
5734
- /**
5735
- * Sprite image ID for this POI's icon.
5736
- *
5737
- * @remarks
5738
- * References an image within the map style's sprite sheet used to
5739
- * render the POI icon on the map.
5740
- *
5741
- * @example 'restaurant-15'
5742
- */
5743
- iconID: string;
5744
5902
  /**
5745
5903
  * Broad category group this POI belongs to.
5746
5904
  *
@@ -5781,6 +5939,39 @@ declare type PoIsSourcesAndLayers = {
5781
5939
  */
5782
5940
  export declare const preparePlacesForDisplay: (placesInput: Place | Place[] | Places_2, instanceIndex: number, config?: PlacesModuleConfig) => Places_2<DisplayPlaceProps>;
5783
5941
 
5942
+ /**
5943
+ * Prepares the output of `calculateReachableRanges` for display with {@link GeometriesModule}.
5944
+ *
5945
+ * Derives labels from each feature's `budget` property by default, applies theme-specific
5946
+ * geometry, and preserves the bounding box. Pass the returned value directly to `module.show()`.
5947
+ *
5948
+ * Note: when using {@link reachableRangeGeometryConfig} this is called automatically — you only
5949
+ * need this function for explicit control over labels or theme.
5950
+ *
5951
+ * Features must be ordered **largest budget first** (e.g. 30 min, 20 min, 10 min).
5952
+ *
5953
+ * @param result Raw output of `calculateReachableRanges`.
5954
+ * @param theme Visual theme. Defaults to `'filled'`.
5955
+ * @param label Custom label generator; when omitted, labels derived from `budget` property.
5956
+ *
5957
+ * @example
5958
+ * ```typescript
5959
+ * // explicit control:
5960
+ * module.show(prepareReachableRangesForDisplay(result, 'inverted'));
5961
+ * module.show(prepareReachableRangesForDisplay(result, 'filled', (f) => myLabel(f)));
5962
+ * ```
5963
+ *
5964
+ * @group Geometries
5965
+ */
5966
+ export declare const prepareReachableRangesForDisplay: (result: PolygonFeatures, theme?: GeometryTheme, label?: ReachableRangeLabelFn) => PolygonFeatures;
5967
+
5968
+ /**
5969
+ * Likelihood of a traffic incident occurring.
5970
+ *
5971
+ * @group Traffic
5972
+ */
5973
+ export declare type ProbabilityOfOccurrence = 'certain' | 'probable' | 'risk_of' | 'improbable';
5974
+
5784
5975
  /**
5785
5976
  * Parameters to update the event state of a feature programmatically.
5786
5977
  *
@@ -5859,6 +6050,31 @@ export declare type PutEventStateOptions = ByIdOrIndex & {
5859
6050
  show?: boolean;
5860
6051
  };
5861
6052
 
6053
+ /**
6054
+ * Returns a {@link GeometriesModuleConfig} for reachable ranges.
6055
+ *
6056
+ * Builds on {@link themedGeometryConfig} and overrides `transformFeaturesForDisplay` so the
6057
+ * raw output of `calculateReachableRanges` can be passed directly to {@link GeometriesModule.show}
6058
+ * — labels are derived from each feature's `budget` property.
6059
+ *
6060
+ * @param palette Color palette. Defaults to `'fadedRainbow'`.
6061
+ * @param theme Visual theme. Defaults to `'filled'`.
6062
+ * @param label Custom label generator; when omitted, labels are derived from `budget` property.
6063
+ *
6064
+ * @example
6065
+ * ```typescript
6066
+ * const module = await GeometriesModule.get(map, reachableRangeGeometryConfig());
6067
+ * const result = await calculateReachableRanges([...]);
6068
+ * module.show(result); // labels and theme applied automatically
6069
+ * ```
6070
+ *
6071
+ * @group Geometries
6072
+ */
6073
+ export declare const reachableRangeGeometryConfig: (palette?: ColorPaletteOptions, theme?: GeometryTheme, label?: ReachableRangeLabelFn) => GeometriesModuleConfig;
6074
+
6075
+ /** Custom label generator for reachable range features. */
6076
+ export declare type ReachableRangeLabelFn = (feature: PolygonFeature, index: number) => string;
6077
+
5862
6078
  /**
5863
6079
  * Available road hierarchy category identifiers.
5864
6080
  *
@@ -5868,7 +6084,7 @@ export declare type PutEventStateOptions = ByIdOrIndex & {
5868
6084
  *
5869
6085
  * @group Traffic
5870
6086
  */
5871
- export declare const roadCategories: readonly ["motorway", "trunk", "primary", "secondary", "tertiary", "street"];
6087
+ export declare const roadCategories: readonly ["motorway", "motorway_link", "trunk", "trunk_link", "primary", "primary_link", "secondary", "secondary_link", "tertiary", "tertiary_link", "street", "service", "track"];
5872
6088
 
5873
6089
  /**
5874
6090
  * Road hierarchy category type.
@@ -5878,17 +6094,29 @@ export declare const roadCategories: readonly ["motorway", "trunk", "primary", "
5878
6094
  * Used for filtering traffic data display based on road significance.
5879
6095
  *
5880
6096
  * Road hierarchy (from highest to lowest):
5881
- * - `motorway` - High-capacity highways with restricted access
5882
- * - `trunk` - Major inter-city roads
5883
- * - `primary` - Primary through routes
5884
- * - `secondary` - Secondary through routes
5885
- * - `tertiary` - Connecting roads (see {@link TertiaryRoadCategory})
5886
- * - `street` - Local streets (see {@link StreetRoadCategory})
6097
+ * - `motorway` / `motorway_link` - High-capacity highways with restricted access
6098
+ * - `trunk` / `trunk_link` - Major inter-city roads
6099
+ * - `primary` / `primary_link` - Primary through routes
6100
+ * - `secondary` / `secondary_link` - Secondary through routes
6101
+ * - `tertiary` / `tertiary_link` - Connecting roads
6102
+ * - `street` - Local streets (see {@link StreetRoadSubCategory})
6103
+ * - `service` - Service roads (see {@link ServiceRoadSubCategory})
6104
+ * - `track` - Unpaved or agricultural tracks
5887
6105
  *
5888
6106
  * @group Traffic
5889
6107
  */
5890
6108
  export declare type RoadCategory = (typeof roadCategories)[number];
5891
6109
 
6110
+ /**
6111
+ * Road sub-category type.
6112
+ *
6113
+ * @remarks
6114
+ * Combines street and service sub-categories. Only `street` and `service` road categories have sub-categories.
6115
+ *
6116
+ * @group Traffic
6117
+ */
6118
+ export declare type RoadSubCategory = StreetRoadSubCategory | ServiceRoadSubCategory;
6119
+
5892
6120
  /**
5893
6121
  * Main route line foreground color.
5894
6122
  * @ignore
@@ -6678,6 +6906,21 @@ export declare type RoutingModuleConfig = MapModuleCommonConfig & {
6678
6906
  * Controls how charging stops source data and/or layer configs are processed to rendering them the map.
6679
6907
  */
6680
6908
  chargingStops?: ChargingStopsConfig;
6909
+ /**
6910
+ * Configuration for the route summary bubbles displayed on the map.
6911
+ *
6912
+ * @remarks
6913
+ * Summary bubbles show key route information (distance, duration, traffic delay)
6914
+ * as visual overlays positioned along the route.
6915
+ */
6916
+ summaryBubbles?: {
6917
+ /**
6918
+ * Controls the visibility of route summary bubbles on the map.
6919
+ *
6920
+ * @defaultValue true
6921
+ */
6922
+ visible?: boolean;
6923
+ };
6681
6924
  /**
6682
6925
  * Custom layer styling configuration.
6683
6926
  *
@@ -6721,6 +6964,31 @@ declare type RoutingSourcesWithLayers = {
6721
6964
  */
6722
6965
  export declare const SELECTED_ROUTE_FILTER: ExpressionSpecification;
6723
6966
 
6967
+ /**
6968
+ * Available service road sub-category identifiers.
6969
+ *
6970
+ * @remarks
6971
+ * Provides finer granularity for classifying service roads.
6972
+ *
6973
+ * @group Traffic
6974
+ */
6975
+ export declare const serviceRoadSubCategories: readonly ["parking", "driveway", "alley"];
6976
+
6977
+ /**
6978
+ * Service road sub-category type.
6979
+ *
6980
+ * @remarks
6981
+ * Further classifies `service` roads into specific sub-types.
6982
+ *
6983
+ * Sub-categories:
6984
+ * - `parking` - Roads within parking areas
6985
+ * - `driveway` - Private access roads
6986
+ * - `alley` - Narrow back-access lanes
6987
+ *
6988
+ * @group Traffic
6989
+ */
6990
+ export declare type ServiceRoadSubCategory = (typeof serviceRoadSubCategories)[number];
6991
+
6724
6992
  /**
6725
6993
  * Optional parameters when showing routes on the map.
6726
6994
  *
@@ -7015,21 +7283,22 @@ export declare const STOP_DISPLAY_INDEX = "stopDisplayIndex";
7015
7283
  *
7016
7284
  * @group Traffic
7017
7285
  */
7018
- export declare const streetRoadCategories: readonly ["local", "minor_local"];
7286
+ export declare const streetRoadSubCategories: readonly ["unclassified", "residential", "living_street"];
7019
7287
 
7020
7288
  /**
7021
7289
  * Street road sub-category type.
7022
7290
  *
7023
7291
  * @remarks
7024
- * Further classifies local streets into specific sub-types for more granular filtering.
7292
+ * Further classifies `street` roads into specific sub-types.
7025
7293
  *
7026
7294
  * Sub-categories:
7027
- * - `local` - Standard local streets
7028
- * - `minor_local` - Minor residential streets
7295
+ * - `unclassified` - Unclassified local roads
7296
+ * - `residential` - Roads in residential areas
7297
+ * - `living_street` - Pedestrian-priority shared streets
7029
7298
  *
7030
7299
  * @group Traffic
7031
7300
  */
7032
- export declare type StreetRoadCategory = (typeof streetRoadCategories)[number];
7301
+ export declare type StreetRoadSubCategory = (typeof streetRoadSubCategories)[number];
7033
7302
 
7034
7303
  /**
7035
7304
  * Handler interface for responding to map style changes.
@@ -7242,28 +7511,26 @@ export declare type SVGIconStyleOptions = {
7242
7511
  export declare type SymbolLayerSpecWithoutSource = Omit<SymbolLayerSpecification, 'source'>;
7243
7512
 
7244
7513
  /**
7245
- * Available tertiary road sub-category identifiers.
7514
+ * Config for themed polygon display with palette-based coloring.
7246
7515
  *
7247
- * @remarks
7248
- * Provides finer granularity for classifying tertiary roads.
7516
+ * Includes data-driven expressions so each feature's `theme` property controls its
7517
+ * styling, line labels config, and positions layers below map labels.
7249
7518
  *
7250
- * @group Traffic
7519
+ * For reachable ranges, use {@link reachableRangeGeometryConfig} which extends this
7520
+ * with auto-generated labels.
7521
+ *
7522
+ * @param palette Color palette for polygon fills. Defaults to `'fadedRainbow'`.
7523
+ *
7524
+ * @group Geometries
7251
7525
  */
7252
- export declare const tertiaryRoadCategories: readonly ["connecting", "major_local"];
7526
+ export declare const themedGeometryConfig: (palette?: ColorPaletteOptions) => GeometriesModuleConfig;
7253
7527
 
7254
7528
  /**
7255
- * Tertiary road sub-category type.
7256
- *
7257
- * @remarks
7258
- * Further classifies tertiary roads into specific sub-types for more granular filtering.
7259
- *
7260
- * Sub-categories:
7261
- * - `connecting` - Roads connecting different areas
7262
- * - `major_local` - Major roads within local areas
7529
+ * Whether the incident is currently active or expected in the future.
7263
7530
  *
7264
7531
  * @group Traffic
7265
7532
  */
7266
- export declare type TertiaryRoadCategory = (typeof tertiaryRoadCategories)[number];
7533
+ export declare type TimeValidity = 'present' | 'future';
7267
7534
 
7268
7535
  /**
7269
7536
  * @ignore
@@ -7993,16 +8260,16 @@ export declare type TrafficCommonFilter = {
7993
8260
  * Filters traffic data by road sub-categories.
7994
8261
  *
7995
8262
  * @remarks
7996
- * Provides finer-grained control for tertiary roads and streets.
7997
- * Applies to sub-categories of {@link TertiaryRoadCategory} and {@link StreetRoadCategory}.
8263
+ * Provides finer-grained control for street and service roads.
8264
+ * Applies to sub-categories of {@link StreetRoadSubCategory} and {@link ServiceRoadSubCategory}.
7998
8265
  *
7999
8266
  * @example
8000
8267
  * ```ts
8001
8268
  * // Hide minor local streets
8002
- * roadSubCategories: { show: 'all_except', values: ['minor_local'] }
8269
+ * roadSubCategories: { show: 'all_except', values: ['living_street'] }
8003
8270
  * ```
8004
8271
  */
8005
- roadSubCategories?: ValuesFilter<TertiaryRoadCategory | StreetRoadCategory>;
8272
+ roadSubCategories?: ValuesFilter<RoadSubCategory>;
8006
8273
  };
8007
8274
 
8008
8275
  /**
@@ -8318,15 +8585,62 @@ export declare class TrafficFlowModule extends AbstractMapModule<TrafficFlowSour
8318
8585
  * ```
8319
8586
  */
8320
8587
  getShown(): {
8321
- trafficFlow: MapGeoJSONFeature[];
8588
+ trafficFlow: TrafficFlowModuleFeature[];
8322
8589
  };
8323
8590
  /**
8324
8591
  * Create the events on/off for this module
8325
8592
  * @returns An instance of EventsModule
8326
8593
  */
8327
- get events(): EventsModule<MapGeoJSONFeature>;
8594
+ get events(): EventsModule<TrafficFlowModuleFeature>;
8328
8595
  }
8329
8596
 
8597
+ /**
8598
+ * Defines the structure of a traffic flow feature, which extends the basic GeoJSON feature
8599
+ * with properties extracted from the traffic flow vector tiles.
8600
+ *
8601
+ * @group Traffic Flow
8602
+ */
8603
+ export declare type TrafficFlowModuleFeature = Omit<MapGeoJSONFeature, 'properties'> & {
8604
+ properties: {
8605
+ /**
8606
+ * Road hierarchy category type.
8607
+ */
8608
+ roadCategory: RoadCategory;
8609
+ /**
8610
+ * Road hierarchy subcategory type. Only present for `street` and `service` road categories.
8611
+ */
8612
+ roadSubcategory?: RoadSubCategory;
8613
+ /**
8614
+ * Speed relative to free-flow traffic, ranging from 0.00 (standstill) to 1.00 (free flow).
8615
+ */
8616
+ relativeSpeed: number;
8617
+ /**
8618
+ * Indicates whether the road segment is in a left-hand traffic region.
8619
+ */
8620
+ leftHandTraffic: boolean;
8621
+ /**
8622
+ * Indicates whether the road segment is closed to traffic.
8623
+ */
8624
+ roadClosure: boolean;
8625
+ /**
8626
+ * Absolute speed in kilometers per hour.
8627
+ */
8628
+ absoluteSpeed?: number;
8629
+ /**
8630
+ * Indicates whether the flow covers different directional geometries (i.e. both directions of a two-way road).
8631
+ */
8632
+ partOfTwoWayRoad?: boolean;
8633
+ /**
8634
+ * OpenLR code describing the location of the flow section.
8635
+ */
8636
+ openlr?: string;
8637
+ /**
8638
+ * Positive integer ranking the importance of the road segment.
8639
+ */
8640
+ displayClass?: number;
8641
+ };
8642
+ };
8643
+
8330
8644
  /**
8331
8645
  * IDs of sources and layers for traffic flow module.
8332
8646
  */
@@ -8353,10 +8667,10 @@ export declare type TrafficIncidentsFilter = TrafficCommonFilter & {
8353
8667
  * @example
8354
8668
  * ```ts
8355
8669
  * // Show only accidents and road closures
8356
- * incidentCategories: { show: 'only', values: ['accident', 'road_closed'] }
8670
+ * incidentCategories: { show: 'only', values: ['accident', 'road-closed'] }
8357
8671
  * ```
8358
8672
  */
8359
- incidentCategories?: ValuesFilter<IncidentCategory>;
8673
+ incidentCategories?: ValuesFilter<TrafficIncidentCategory>;
8360
8674
  /**
8361
8675
  * Filters incidents by delay severity magnitude.
8362
8676
  *
@@ -8408,7 +8722,7 @@ export declare type TrafficIncidentsFilter = TrafficCommonFilter & {
8408
8722
  * filters: {
8409
8723
  * any: [
8410
8724
  * { magnitudes: { show: 'only', values: ['major'] } },
8411
- * { incidentCategories: { show: 'only', values: ['road_closed'] } }
8725
+ * { incidentCategories: { show: 'only', values: ['road-closed'] } }
8412
8726
  * ]
8413
8727
  * }
8414
8728
  * ```
@@ -8475,7 +8789,7 @@ export declare type TrafficIncidentsFilters = {
8475
8789
  * any: [{
8476
8790
  * incidentCategories: {
8477
8791
  * show: 'only',
8478
- * values: ['accident', 'road_closed']
8792
+ * values: ['accident', 'road-closed']
8479
8793
  * }
8480
8794
  * }]
8481
8795
  * });
@@ -8485,7 +8799,7 @@ export declare type TrafficIncidentsFilters = {
8485
8799
  * any: [{
8486
8800
  * incidentCategories: {
8487
8801
  * show: 'all_except',
8488
- * values: ['road_works']
8802
+ * values: ['roadworks']
8489
8803
  * }
8490
8804
  * }]
8491
8805
  * });
@@ -8572,7 +8886,7 @@ export declare class TrafficIncidentsModule extends AbstractMapModule<TrafficInc
8572
8886
  * any: [{
8573
8887
  * incidentCategories: {
8574
8888
  * show: 'only',
8575
- * values: ['accident', 'road_closed', 'jam']
8889
+ * values: ['accident', 'road-closed', 'jam']
8576
8890
  * }
8577
8891
  * }]
8578
8892
  * }
@@ -8606,13 +8920,13 @@ export declare class TrafficIncidentsModule extends AbstractMapModule<TrafficInc
8606
8920
  * - `roadSubCategories`: Filter by specific road types
8607
8921
  *
8608
8922
  * **Available Incident Categories:**
8609
- * - `accident`, `road_closed`, `lane_closed`
8610
- * - `road_works` (construction)
8923
+ * - `accident`, `road-closed`, `lane-closed`
8924
+ * - `roadworks` (construction)
8611
8925
  * - `jam` (traffic jam)
8612
- * - `fog`, `rain`, `ice`, `wind`, `flooding`
8613
- * - `dangerous_conditions`
8614
- * - `broken_down_vehicle`
8615
- * - `unknown`
8926
+ * - `fog`, `rain`, `frost`, `wind`, `flooding`
8927
+ * - `danger`, `animals-on-road`, `narrow-lanes`
8928
+ * - `broken-down-vehicle`
8929
+ * - `other`
8616
8930
  *
8617
8931
  * **Delay Magnitudes:**
8618
8932
  * - `minor`: Small delays
@@ -8627,7 +8941,7 @@ export declare class TrafficIncidentsModule extends AbstractMapModule<TrafficInc
8627
8941
  * any: [{
8628
8942
  * incidentCategories: {
8629
8943
  * show: 'only',
8630
- * values: ['accident', 'road_closed']
8944
+ * values: ['accident', 'road-closed']
8631
8945
  * }
8632
8946
  * }]
8633
8947
  * });
@@ -8769,15 +9083,101 @@ export declare class TrafficIncidentsModule extends AbstractMapModule<TrafficInc
8769
9083
  * ```
8770
9084
  */
8771
9085
  getShown(): {
8772
- trafficIncidents: MapGeoJSONFeature[];
9086
+ trafficIncidents: TrafficIncidentsModuleFeature[];
8773
9087
  };
8774
9088
  /**
8775
9089
  * Create the events on/off for this module
8776
9090
  * @returns An instance of EventsModule
8777
9091
  */
8778
- get events(): EventsModule<MapGeoJSONFeature>;
9092
+ get events(): EventsModule<TrafficIncidentsModuleFeature>;
8779
9093
  }
8780
9094
 
9095
+ /**
9096
+ * Defines the structure of a traffic incident feature, which extends the basic GeoJSON feature with specific properties related to traffic incidents. This type is used to represent individual traffic incidents on the map, providing details such as the description of the incident, its severity, and the road category where it is occurring.
9097
+ */
9098
+ export declare type TrafficIncidentsModuleFeature = Omit<MapGeoJSONFeature, 'properties'> & {
9099
+ /**
9100
+ * Properties specific to traffic incidents, extracted from the vector tile data.
9101
+ *
9102
+ * @remarks
9103
+ * These properties include a unique identifier for the incident, a description of the incident, its category, the magnitude of any resulting delay, and information about the road where the incident is occurring (including road category and subcategory). Additionally, it indicates whether the incident is in a left-hand traffic region.
9104
+ */
9105
+ properties: {
9106
+ /**
9107
+ * Unique identifier for the traffic incident, common across Traffic API services.
9108
+ */
9109
+ id: string;
9110
+ /**
9111
+ * Description of the traffic incident, providing details about the nature of the incident.
9112
+ */
9113
+ description: string;
9114
+ /**
9115
+ * Category of the traffic incident, classifying the type of incident (e.g., accident, roadworks, congestion) based on predefined categories.
9116
+ */
9117
+ category: TrafficIncidentCategory;
9118
+ /**
9119
+ * Severity of the delay.
9120
+ */
9121
+ magnitudeOfDelay: DelayMagnitude;
9122
+ /**
9123
+ * The delay caused by the incident in seconds (except in road closures). It is calculated against free-flow travel time (the travel time when the traffic is minimal, e.g., night traffic).
9124
+ */
9125
+ delayInSeconds?: number;
9126
+ /**
9127
+ * Road hierarchy category type.
9128
+ */
9129
+ roadCategory: RoadCategory;
9130
+ /**
9131
+ * Road hierarchy subcategory type, providing more specific classification of the road where the incident is occurring.
9132
+ */
9133
+ roadSubcategory: RoadSubCategory;
9134
+ /**
9135
+ * Indicates whether the traffic incident is occurring in a left-hand traffic region.
9136
+ */
9137
+ leftHandTraffic: boolean;
9138
+ /**
9139
+ * Indicates whether the incident covers different directional geometries (i.e. both directions of a two-way road).
9140
+ */
9141
+ partOfTwoWayRoad?: boolean;
9142
+ /**
9143
+ * The date and time when the incident started.
9144
+ */
9145
+ startTime?: Date;
9146
+ /**
9147
+ * The estimated date and time when the incident will end.
9148
+ */
9149
+ endTime?: Date;
9150
+ /**
9151
+ * Likelihood assessment of the incident occurring.
9152
+ */
9153
+ probabilityOfOccurrence?: ProbabilityOfOccurrence;
9154
+ /**
9155
+ * Number of user reports for the incident.
9156
+ */
9157
+ numberOfReports?: number;
9158
+ /**
9159
+ * The date and time of the most recent user report for the incident.
9160
+ */
9161
+ lastReportTime?: Date;
9162
+ /**
9163
+ * Average speed within the incident area, in km/h.
9164
+ */
9165
+ averageSpeedKmph?: number;
9166
+ /**
9167
+ * OpenLR code describing the location of the incident.
9168
+ */
9169
+ openlr?: string;
9170
+ /**
9171
+ * Whether the incident is currently active or expected in the future.
9172
+ */
9173
+ timeValidity?: TimeValidity;
9174
+ /**
9175
+ * Positive integer ranking the importance of the road where the incident occurs.
9176
+ */
9177
+ displayClass?: number;
9178
+ };
9179
+ };
9180
+
8781
9181
  /**
8782
9182
  * IDs of sources and layers for traffic incidents module.
8783
9183
  */