@tomtom-org/maps-sdk 0.61.0 → 0.62.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.
@@ -268,19 +268,19 @@ export type StandardStyleID = (typeof standardStyleIDs)[number];
268
268
  /**
269
269
  * Configuration for a TomTom standard map style.
270
270
  *
271
- * Provides options to customize which modules are included.
271
+ * Provides options to customize which style parts are included.
272
272
  *
273
273
  * @example
274
274
  * ```typescript
275
- * // Standard style with all default modules
275
+ * // Standard style with every style part
276
276
  * const style: StandardStyle = {
277
277
  * id: 'standardLight'
278
278
  * };
279
279
  *
280
- * // Exclude traffic modules
280
+ * // Leave the traffic parts out
281
281
  * const styleNoTraffic: StandardStyle = {
282
282
  * id: 'standardLight',
283
- * include: ['hillshade'] // Only include hillshade, exclude traffic
283
+ * include: ['terrain']
284
284
  * };
285
285
  * ```
286
286
  *
@@ -294,33 +294,11 @@ export type StandardStyle = {
294
294
  */
295
295
  id?: StandardStyleID;
296
296
  /**
297
- * Modules to include when loading the style.
298
- * * Use this to selectively enable only needed modules for better performance.
297
+ * Which {@link StylePart}s to load. Leave it out for every part; `[]` loads none.
299
298
  *
300
- * If not specified, all available modules are included by default.
301
- * If an empty array is provided, no optional modules will be included.
302
- *
303
- * @default All available modules
304
- *
305
- * @remarks
306
- * Available modules:
307
- * - `trafficIncidents`: Real-time traffic incidents (accidents, closures)
308
- * - `trafficFlow`: Real-time traffic flow visualization
309
- * - `hillshade`: Terrain elevation data, for hillshade shading and 3D terrain
310
- *
311
- * @example
312
- * ```typescript
313
- * // Include only traffic modules
314
- * include: ['trafficIncidents', 'trafficFlow']
315
- *
316
- * // Include only hillshade
317
- * include: ['hillshade']
318
- *
319
- * // Include no optional modules
320
- * include: []
321
- * ```
299
+ * @default All style parts
322
300
  */
323
- include?: StyleModule[];
301
+ include?: StylePart[];
324
302
  };
325
303
  /**
326
304
  * Where a custom style comes from: a URL to fetch it from, or the specification itself. Exactly one.
@@ -402,22 +380,21 @@ export type CustomStyle = CustomStyleSource & {
402
380
  lightDarkTheme?: LightDark;
403
381
  };
404
382
  /**
405
- * Array of all available style modules.
383
+ * Every {@link StylePart}.
406
384
  *
407
385
  * @group Map Style
408
386
  */
409
- export declare const styleModules: readonly ["trafficIncidents", "trafficFlow", "hillshade"];
387
+ export declare const styleParts: readonly ["trafficIncidents", "trafficFlow", "terrain"];
410
388
  /**
411
- * Optional map modules that can be included with a style.
389
+ * Optional part of a standard style, included or left out with {@link StandardStyle.include}.
412
390
  *
413
- * @remarks
414
- * - `trafficIncidents`: Shows real-time traffic incidents on the map
415
- * - `trafficFlow`: Shows real-time traffic flow with color-coded speeds
416
- * - `hillshade`: Adds terrain elevation data, drawn by {@link TerrainModule} as hillshade shading and 3D terrain
391
+ * - `trafficIncidents`: real-time traffic incidents
392
+ * - `trafficFlow`: real-time traffic flow
393
+ * - `terrain`: elevation data, drawn by {@link TerrainModule} as hillshade and 3D terrain
417
394
  *
418
395
  * @group Map Style
419
396
  */
420
- export type StyleModule = (typeof styleModules)[number];
397
+ export type StylePart = (typeof styleParts)[number];
421
398
  /**
422
399
  * Map style specification for initialization.
423
400
  *
@@ -439,7 +416,7 @@ export type StyleModule = (typeof styleModules)[number];
439
416
  * style: {
440
417
  * type: 'standard',
441
418
  * id: 'standardLight',
442
- * include: ['trafficFlow', 'hillshade']
419
+ * include: ['trafficFlow', 'terrain']
443
420
  * }
444
421
  *
445
422
  * // 3. Custom style from URL
@@ -1416,7 +1393,7 @@ type LayerFilterContributions = {
1416
1393
  /**
1417
1394
  * The single owner of a style layer's `filter`.
1418
1395
  *
1419
- * Several modules narrow the same layer: {@link POIsModule.filterCategories} adds a category clause
1396
+ * Several modules narrow the same layer: the {@link POIsModule} category filter adds a clause
1420
1397
  * to the POI layer, and the styling knob `pois.zoomShift` rewrites the density term inside that same
1421
1398
  * layer's filter. Each rebuilding the filter from its own snapshot of the style means whichever
1422
1399
  * writes last drops the other's work, with nothing to show that it happened.
@@ -1596,7 +1573,7 @@ export type StylingEvents = CombinedEvents<MapGeoJSONFeature, StylingSettings, n
1596
1573
  * never shows them while {@link POIsModule} or {@link BaseMapModule} hides them, and unsetting one
1597
1574
  * leaves the layers as their module has them.
1598
1575
  *
1599
- * `pois.zoomShift` rewrites the POI layer filters, which {@link POIsModule.filterCategories} also
1576
+ * `pois.zoomShift` rewrites the POI layer filters, which the {@link POIsModule} category filter also
1600
1577
  * narrows: the two compose, so either can be set at any time and neither drops the other.
1601
1578
  *
1602
1579
  * @example
@@ -1944,7 +1921,7 @@ export type SetStyleOptions = {
1944
1921
  * Whether to drop the SDK state instead of carrying it over to the new style.
1945
1922
  *
1946
1923
  * - `false` (default): module data and configuration, filters and the style parts of the
1947
- * previous style (traffic, hillshade) are restored onto the new style.
1924
+ * previous style (traffic, terrain) are restored onto the new style.
1948
1925
  * - `true`: a clean switch. Modules re-bind to the new style with default configuration and
1949
1926
  * nothing shown, and only the style parts named in the new style input are loaded.
1950
1927
  *
@@ -2207,7 +2184,7 @@ export declare class TomTomMap {
2207
2184
  * style: {
2208
2185
  * type: 'standard',
2209
2186
  * id: 'standardLight',
2210
- * include: ['trafficFlow', 'hillshade']
2187
+ * include: ['trafficFlow', 'terrain']
2211
2188
  * },
2212
2189
  * language: 'en-US',
2213
2190
  * events: {
@@ -2287,7 +2264,7 @@ export declare class TomTomMap {
2287
2264
  * map.setStyle({
2288
2265
  * type: 'standard',
2289
2266
  * id: 'standardLight',
2290
- * include: ['trafficFlow', 'hillshade']
2267
+ * include: ['trafficFlow', 'terrain']
2291
2268
  * });
2292
2269
  * ```
2293
2270
  *
@@ -2315,7 +2292,7 @@ export declare class TomTomMap {
2315
2292
  *
2316
2293
  * @see {@link TomTomMapParams.style} - For setting style during initialization
2317
2294
  * @see {@link StyleChangeHandler} - For handling style change events
2318
- * @see {@link getStyle} - For retrieving the current style
2295
+ * @see {@link getStyleInput} - For retrieving the current style input
2319
2296
  * @see [Map Styles Guide](https://docs.tomtom.com/maps-sdk-js/guides/map/styles)
2320
2297
  */
2321
2298
  setStyle: (style: StyleInput, options?: SetStyleOptions) => Promise<void>;
@@ -2324,46 +2301,18 @@ export declare class TomTomMap {
2324
2301
  private isSuperseded;
2325
2302
  private notifyHandlers;
2326
2303
  /**
2327
- * Retrieves the current style configuration of the map.
2328
- *
2329
- * @returns The current {@link StyleInput} configuration, or `undefined` if no style is set.
2330
- *
2331
- * @remarks
2332
- * Returns the style configuration as it was set, not the fully resolved MapLibre style object.
2333
- * Use this to inspect or store the current style configuration for later restoration.
2334
- *
2335
- * **Return Value:**
2336
- * - String ID (e.g., `'standardLight'`) for simple style configurations
2337
- * - Style object with `type`, `id`, and optional `include` properties for detailed configurations
2338
- * - `undefined` if no style has been explicitly set
2339
- *
2340
- * @example
2341
- * ```typescript
2342
- * const currentStyle = map.getStyle();
2343
- * console.log('Current style:', currentStyle);
2304
+ * The {@link StyleInput} the map was last given, through its parameters or {@link setStyle}.
2344
2305
  *
2345
- * // Save style for later
2346
- * const savedStyle = map.getStyle();
2347
- *
2348
- * // Later, restore it
2349
- * if (savedStyle) {
2350
- * map.setStyle(savedStyle);
2351
- * }
2352
- * ```
2306
+ * The input as it was given, not the resolved style specification: that is
2307
+ * {@link StylingModule.exportStyle}, or `mapLibreMap.getStyle()`.
2353
2308
  *
2354
2309
  * @example
2355
- * Conditional logic based on current style:
2356
2310
  * ```typescript
2357
- * const style = map.getStyle();
2358
- * if (typeof style === 'string' && style.includes('Dark')) {
2359
- * console.log('Dark mode is active');
2360
- * }
2311
+ * const style = map.getStyleInput();
2312
+ * if (style) map.setStyle(style);
2361
2313
  * ```
2362
- *
2363
- * @see {@link setStyle} - For changing the map style
2364
- * @see {@link StyleInput} - For available style configuration options
2365
2314
  */
2366
- getStyle: () => StyleInput | undefined;
2315
+ getStyleInput: () => StyleInput | undefined;
2367
2316
  /**
2368
2317
  * Re-tags the `tomtom-user-agent` header this map sends on its MapLibre requests (style, tiles,
2369
2318
  * sprites, glyphs), letting a product embedding the SDK count the traffic under its own name,
@@ -2609,7 +2558,7 @@ export declare class TomTomMap {
2609
2558
  * ```typescript
2610
2559
  * map.addStyleChangeHandler({
2611
2560
  * onStyleAboutToChange: async () => {
2612
- * await saveStateToAPI(map.getStyle());
2561
+ * await saveStateToAPI(map.getStyleInput());
2613
2562
  * },
2614
2563
  * onStyleChanged: async () => {
2615
2564
  * await loadStateFromAPI();
@@ -2626,7 +2575,7 @@ export declare class TomTomMap {
2626
2575
  * },
2627
2576
  * onStyleChanged: () => {
2628
2577
  * document.body.classList.remove('style-changing');
2629
- * const style = map.getStyle();
2578
+ * const style = map.getStyleInput();
2630
2579
  * if (typeof style === 'string' && style.includes('Dark')) {
2631
2580
  * document.body.classList.add('dark-mode');
2632
2581
  * } else {
@@ -2711,6 +2660,7 @@ export declare class TomTomMap {
2711
2660
  *
2712
2661
  * @see {@link GeometryBeforeLayerConfig} for GeometriesModule layer positioning options
2713
2662
  * @see {@link RoutingBeforeLayerConfig} for RoutingModule layer positioning options
2663
+ * @see {@link PlacesBeforeLayerConfig} for PlacesModule layer positioning options
2714
2664
  *
2715
2665
  * @group Map Style
2716
2666
  */
@@ -3052,6 +3002,11 @@ export declare class AddedSourceWithLayers<SOURCE_SPEC extends SourceSpecificati
3052
3002
  private ensureLayersAddedToMap;
3053
3003
  ensureAddedToMapWithVisibility(visible: boolean, addLayersToMap: boolean): void;
3054
3004
  }
3005
+ /**
3006
+ * A copy of the feature with the given event state, or without one.
3007
+ * @ignore
3008
+ */
3009
+ export declare const withEventState: <F extends Feature>(feature: F, eventState: EventState | undefined) => F;
3055
3010
  /**
3056
3011
  * Options for the {@link GeoJSONSourceWithLayers.show} method.
3057
3012
  * @ignore
@@ -3092,9 +3047,16 @@ export declare class GeoJSONSourceWithLayers<T extends FeatureCollection = Featu
3092
3047
  findById(id: string | number | undefined): IndexedFeature<T['features'][number]> | undefined;
3093
3048
  clear(): void;
3094
3049
  private findFeature;
3050
+ private showWithFeatures;
3095
3051
  putEventState(options: PutEventStateOptions): void;
3096
3052
  cleanEventState(options: CleanEventStateOptions): void;
3097
3053
  cleanEventStates(options?: CleanEventStatesOptions): void;
3054
+ /**
3055
+ * Collects the ids of the shown features by event state into `into`, skipping an id already
3056
+ * listed under its state, so several sources showing the same features can share one result.
3057
+ * A feature without an id is skipped: {@link ByIdOrIndex} could not address it by one.
3058
+ */
3059
+ getEventStates(into?: EventStateIds): EventStateIds;
3098
3060
  }
3099
3061
  //#endregion
3100
3062
  //#region src/shared/types/mapsSDKLayerSpecs.d.ts
@@ -3399,26 +3361,20 @@ type EventType = ClickEventType | HoverEventType;
3399
3361
  */
3400
3362
  type EventState = EventType | 'recently-hovered';
3401
3363
  /**
3402
- * Parameters to identify a feature by its ID or index in a given features array.
3364
+ * Parameters to identify a shown feature by its ID or by its index.
3403
3365
  * @group User Interaction Events
3404
3366
  */
3405
3367
  type ByIdOrIndex = {
3406
3368
  /**
3407
- * The unique identifier of the feature.
3408
- *
3409
- * @remarks
3410
- * This ID corresponds to the `id` property of the feature being targeted.
3411
- * Cannot be used together with `index`.
3369
+ * The id of the feature: its `properties.id`, else its top-level `id` — the id the
3370
+ * module's `getShown()` and event handlers hand back. Cannot be used together with `index`.
3412
3371
  */
3413
- id: string;
3372
+ id: string | number;
3414
3373
  } | {
3415
3374
  /**
3416
- * The index of the feature in the feature array.
3417
- *
3418
- * @remarks
3419
- * Zero-based index referring to the position in the features array
3420
- * that was passed to the module's show method.
3421
- * Cannot be used together with `id`.
3375
+ * The zero-based position of the feature in the collection the module's `getShown()`
3376
+ * returns for it. Where a module draws its features in several sources, each source counts
3377
+ * its own. Cannot be used together with `id`.
3422
3378
  */
3423
3379
  index: number;
3424
3380
  };
@@ -3590,6 +3546,22 @@ type CleanEventStatesOptions = {
3590
3546
  */
3591
3547
  show?: boolean;
3592
3548
  };
3549
+ /**
3550
+ * The ids of the shown features that have an event state, by state: what `putEventState` and
3551
+ * user interactions have put, and `cleanEventState(s)` hasn't taken off yet.
3552
+ *
3553
+ * @remarks
3554
+ * A state no feature has is absent rather than an empty array. The ids are those
3555
+ * {@link ByIdOrIndex} takes, so each can go straight back into `putEventState` or `cleanEventState`.
3556
+ *
3557
+ * @example
3558
+ * ```typescript
3559
+ * const { click: [selectedID] = [] } = placesModule.getEventStates();
3560
+ * ```
3561
+ *
3562
+ * @group User Interaction Events
3563
+ */
3564
+ type EventStateIds = Partial<Record<EventState, (string | number)[]>>;
3593
3565
  /**
3594
3566
  * Properties part for an object that can have event state.
3595
3567
  *
@@ -5479,6 +5451,16 @@ export declare abstract class AbstractMapModule<SOURCES_WITH_LAYERS extends Sour
5479
5451
  * @ignore
5480
5452
  */
5481
5453
  protected userEvents<T = MapGeoJSONFeature, WHERE_SCOPE = never>(sourceNames: (keyof SOURCES_WITH_LAYERS)[], options?: EventScopeOptions<T, WHERE_SCOPE>): UserEvents<T, WHERE_SCOPE>;
5454
+ /**
5455
+ * What {@link userEvents} builds a scope from, for a subclass that builds a richer one.
5456
+ * @ignore
5457
+ */
5458
+ protected userEventsOptions<T, WHERE_SCOPE>(sourceNames: (keyof SOURCES_WITH_LAYERS)[], options: EventScopeOptions<T, WHERE_SCOPE>): UserEventsOptions<T, WHERE_SCOPE>;
5459
+ /**
5460
+ * The current sources of the given names, skipping the ones this module does not have now.
5461
+ * @ignore
5462
+ */
5463
+ protected sourcesNamed(sourceNames: (keyof SOURCES_WITH_LAYERS)[]): SOURCES_WITH_LAYERS[keyof SOURCES_WITH_LAYERS][];
5482
5464
  /**
5483
5465
  * `config-change` alone: the event surface of a module with no `show` and nothing on the map a
5484
5466
  * user can interact with, and the lifecycle half of {@link moduleEvents}.
@@ -5515,6 +5497,42 @@ export declare abstract class AbstractMapModule<SOURCES_WITH_LAYERS extends Sour
5515
5497
  protected buildEvents<T, TShown, WHERE_SCOPE, NAMED_SCOPES extends object>(moduleWide: CombinedEvents<T, CFG, TShown, WHERE_SCOPE>, scopes: NAMED_SCOPES): CombinedEvents<T, CFG, TShown, WHERE_SCOPE> & NAMED_SCOPES;
5516
5498
  }
5517
5499
  //#endregion
5500
+ //#region src/shared/UserEventsWithStates.d.ts
5501
+ /**
5502
+ * A named events scope of a module that draws its own data: the {@link UserEvents} of one part of
5503
+ * what the module shows, plus the event states of those features.
5504
+ *
5505
+ * @remarks
5506
+ * The module's own `putEventState`, `cleanEventState`, `cleanEventStates` and `getEventStates` act
5507
+ * on the features its `show` takes; a scope's act on the scope's features alone, by the ids its
5508
+ * handlers receive — `routing.events.waypoints` on the waypoints, `custom.events.<source>` on one
5509
+ * source. A {@link UserEvents.where} narrowing returns plain {@link UserEvents}: a state belongs to
5510
+ * a feature, not to a predicate over features.
5511
+ *
5512
+ * @example
5513
+ * ```typescript
5514
+ * routing.events.waypoints.putEventState({ id: waypoint.id, state: 'click' });
5515
+ * const { hover: hoveredStops = [] } = routing.events.waypoints.getEventStates();
5516
+ * ```
5517
+ *
5518
+ * @group User Interaction Events
5519
+ */
5520
+ export declare class UserEventsWithStates<T = MapGeoJSONFeature> extends UserEvents<T> {
5521
+ private readonly eventStates;
5522
+ /**
5523
+ * @param sources Resolves the sources this scope's features are drawn in, on every call.
5524
+ */
5525
+ constructor(options: UserEventsOptions<T, never>, sources: () => GeoJSONSourceWithLayers[]);
5526
+ /** Puts an event state on one of this scope's features; see {@link PutEventStateOptions}. */
5527
+ putEventState(options: PutEventStateOptions): void;
5528
+ /** Takes the event state off one of this scope's features. */
5529
+ cleanEventState(options: CleanEventStateOptions): void;
5530
+ /** Takes the given event states, or all of them, off this scope's features. */
5531
+ cleanEventStates(options?: CleanEventStatesOptions): void;
5532
+ /** The ids of this scope's features that have an event state, by state. */
5533
+ getEventStates(): EventStateIds;
5534
+ }
5535
+ //#endregion
5518
5536
  //#region src/shared/AbstractDataOwnedMapModule.d.ts
5519
5537
  /**
5520
5538
  * Base class for the map modules that add and own their own GeoJSON sources, layers and images:
@@ -5530,6 +5548,12 @@ export declare abstract class AbstractMapModule<SOURCES_WITH_LAYERS extends Sour
5530
5548
  *
5531
5549
  * Every such module hides and shows through {@link setVisible}, which keeps the data it shows.
5532
5550
  *
5551
+ * Owning the features also lets it read and write their {@link EventState | event states}:
5552
+ * {@link putEventState}, {@link cleanEventState}, {@link cleanEventStates} and
5553
+ * {@link getEventStates} act on the features its `show` takes, and each named scope of its
5554
+ * `events` carries the same four over its own part ({@link UserEventsWithStates}). A style change
5555
+ * shows again what its sources draw, not the data `show` was given, so the states survive it.
5556
+ *
5533
5557
  * @typeParam SOURCES_WITH_LAYERS - The GeoJSON sources, with their layers, this module owns
5534
5558
  * @typeParam CFG - The configuration type for this module, or undefined if no configuration is needed
5535
5559
  *
@@ -5538,6 +5562,7 @@ export declare abstract class AbstractMapModule<SOURCES_WITH_LAYERS extends Sour
5538
5562
  export declare abstract class AbstractDataOwnedMapModule<SOURCES_WITH_LAYERS extends GeoJSONSourcesWithLayers, CFG extends (MapModuleCommonConfig & {
5539
5563
  visible?: boolean;
5540
5564
  }) | undefined = undefined> extends AbstractMapModule<SOURCES_WITH_LAYERS, CFG> {
5565
+ private readonly eventStates;
5541
5566
  /**
5542
5567
  * Owning the data it draws, such a module always remembers something a clean style switch must
5543
5568
  * forget, so the inherited no-op becomes a duty here. A module that remembers nothing
@@ -5577,6 +5602,75 @@ export declare abstract class AbstractDataOwnedMapModule<SOURCES_WITH_LAYERS ext
5577
5602
  * module with nothing shown draws nothing; `getShown()` returns what is shown.
5578
5603
  */
5579
5604
  isVisible(): boolean;
5605
+ /**
5606
+ * The sources drawing the features `show` takes, which the event-state methods act on. Several
5607
+ * when the module draws those features more than once; missing ones are skipped.
5608
+ * @protected
5609
+ * @ignore
5610
+ */
5611
+ protected abstract eventStateSources(): (keyof SOURCES_WITH_LAYERS)[];
5612
+ /**
5613
+ * A named events scope over the given sources, carrying their event states as well.
5614
+ * @ignore
5615
+ */
5616
+ protected userEventsWithStates<T = MapGeoJSONFeature>(sourceNames: (keyof SOURCES_WITH_LAYERS)[], options?: Pick<UserEventsOptions<T, never>, 'mapping'>): UserEventsWithStates<T>;
5617
+ /**
5618
+ * Puts an event state on one of the shown features, as a user interaction would.
5619
+ *
5620
+ * @remarks
5621
+ * The state is what the module's own layers draw (place pins and entry points, route outlines,
5622
+ * geometries, details-module incidents, area-analytics cells), what layers of yours read with
5623
+ * `['get', 'eventState']`, and what {@link getEventStates} returns. It lasts as long as the shown
5624
+ * feature does: through {@link setVisible}, style and configuration changes, not through a new
5625
+ * `show`, a `clear` or a `setStyle` with `resetState`.
5626
+ *
5627
+ * @example
5628
+ * ```typescript
5629
+ * // Select a feature from a list, as a click would
5630
+ * module.putEventState({ id: feature.id, state: 'click' });
5631
+ *
5632
+ * // Hover a second one without taking the hover off the first
5633
+ * module.putEventState({ index: 2, state: 'hover', mode: 'add' });
5634
+ * ```
5635
+ */
5636
+ putEventState(options: PutEventStateOptions): void;
5637
+ /**
5638
+ * Takes the event state off one of the shown features.
5639
+ *
5640
+ * @example
5641
+ * ```typescript
5642
+ * module.cleanEventState({ id: feature.id });
5643
+ * ```
5644
+ */
5645
+ cleanEventState(options: CleanEventStateOptions): void;
5646
+ /**
5647
+ * Takes the given event states, or all of them, off the shown features.
5648
+ *
5649
+ * @example
5650
+ * ```typescript
5651
+ * module.cleanEventStates(); // every state
5652
+ * module.cleanEventStates({ states: ['hover'] }); // hovers only, selections stay
5653
+ * ```
5654
+ */
5655
+ cleanEventStates(options?: CleanEventStatesOptions): void;
5656
+ /**
5657
+ * Returns the ids of the shown features that have an event state, by state.
5658
+ *
5659
+ * @remarks
5660
+ * The read side of {@link putEventState} and {@link cleanEventStates}: it reflects those and
5661
+ * the states user interactions put. The ids are those `getShown()` and the event handlers hand
5662
+ * back, so each can go straight back into {@link putEventState}.
5663
+ *
5664
+ * @example
5665
+ * ```typescript
5666
+ * // Keep a list in sync with the selected feature
5667
+ * const { click: [selectedID] = [] } = module.getEventStates();
5668
+ *
5669
+ * // Is this feature hovered?
5670
+ * const hovered = module.getEventStates().hover?.includes(feature.id) ?? false;
5671
+ * ```
5672
+ */
5673
+ getEventStates(): EventStateIds;
5580
5674
  }
5581
5675
  //#endregion
5582
5676
  //#region src/shared/layers/layerVisibilityComposer.d.ts
@@ -5786,12 +5880,24 @@ export declare const validateKnobValue: (knob: KnobEntry<string>, value: unknown
5786
5880
  export declare const setKnob: <CONFIG extends MapModuleCommonConfig, ID extends string, KNOB extends ID>(module: Pick<AbstractMapModule<SourcesWithLayers, CONFIG>, "getConfig" | "applyConfig">, catalogue: readonly KnobEntry<ID>[], id: KNOB, value: KnobPlainValue<ValueAt<CONFIG, KNOB>>) => void;
5787
5881
  //#endregion
5788
5882
  //#region src/shared/layers/sourcesIDs.d.ts
5883
+ /**
5884
+ * Source identifier for base map vector tiles.
5885
+ *
5886
+ * @remarks
5887
+ * References the primary vector tile source containing roads, buildings,
5888
+ * land use, water bodies, and other fundamental map features.
5889
+ *
5890
+ * @group Base Map
5891
+ */
5892
+ export declare const BASE_MAP_SOURCE_ID = "vectorTiles";
5789
5893
  /**
5790
5894
  * Source identifier for POI (Point of Interest) vector tiles.
5791
5895
  *
5792
5896
  * @remarks
5793
5897
  * Used to reference the POI layer in the map style, which contains
5794
- * business locations, landmarks, and other points of interest.
5898
+ * business locations, landmarks, and other points of interest. The base map
5899
+ * tiles carry them, so this is {@link BASE_MAP_SOURCE_ID} under the name the
5900
+ * POI layers are selected by.
5795
5901
  *
5796
5902
  * @group POIs
5797
5903
  */
@@ -5816,16 +5922,6 @@ export declare const HILLSHADE_SOURCE_ID = "hillshade";
5816
5922
  * @group Terrain
5817
5923
  */
5818
5924
  export declare const TERRAIN_SOURCE_ID = "hillshade-terrain";
5819
- /**
5820
- * Source identifier for base map vector tiles.
5821
- *
5822
- * @remarks
5823
- * References the primary vector tile source containing roads, buildings,
5824
- * land use, water bodies, and other fundamental map features.
5825
- *
5826
- * @group Base Map
5827
- */
5828
- export declare const BASE_MAP_SOURCE_ID = "vectorTiles";
5829
5925
  /**
5830
5926
  * Source identifier for traffic incidents vector tiles.
5831
5927
  *
@@ -6480,7 +6576,7 @@ export type CustomGeoJSONShownFeatures<TSources extends Record<string, FeatureCo
6480
6576
  sourceName: K;
6481
6577
  data: TSources[K];
6482
6578
  }; }[keyof TSources];
6483
- export type CustomGeoJSONEvents<TSources extends Record<string, FeatureCollection>> = CombinedEvents<MapGeoJSONFeature, CustomGeoJSONModuleConfig<TSources>, CustomGeoJSONShownFeatures<TSources>> & { [K in keyof TSources]: UserEvents<MapGeoJSONFeature>; };
6579
+ export type CustomGeoJSONEvents<TSources extends Record<string, FeatureCollection>> = CombinedEvents<MapGeoJSONFeature, CustomGeoJSONModuleConfig<TSources>, CustomGeoJSONShownFeatures<TSources>> & { [K in keyof TSources]: UserEventsWithStates<MapGeoJSONFeature>; };
6484
6580
  /**
6485
6581
  * Module for displaying customer-owned GeoJSON data with TomTom SDK support.
6486
6582
  *
@@ -6557,7 +6653,7 @@ export type CustomGeoJSONEvents<TSources extends Record<string, FeatureCollectio
6557
6653
  export declare class CustomGeoJSONModule<TSources extends Record<string, FeatureCollection> = Record<string, FeatureCollection>> extends AbstractDataOwnedMapModule<CustomGeoJSONSourcesWithLayers<TSources>, CustomGeoJSONModuleConfig<TSources>> {
6558
6654
  private resolvedSourceIDs;
6559
6655
  private resolvedLayerSpecs;
6560
- private lastShown;
6656
+ private shownSourceNames;
6561
6657
  private initialConfig;
6562
6658
  private readonly shownFeaturesHandlers;
6563
6659
  /**
@@ -6620,6 +6716,12 @@ export declare class CustomGeoJSONModule<TSources extends Record<string, Feature
6620
6716
  * feature collection that `GeoJSONSourceWithLayers` keeps as initial state.
6621
6717
  */
6622
6718
  getShown(): { [K in keyof TSources]: TSources[K]; };
6719
+ /**
6720
+ * Every source: the module's event-state methods act on all of them, as a `show` without a
6721
+ * source name does. Act on one source through its scope, `events.<sourceName>`.
6722
+ * @ignore
6723
+ */
6724
+ protected eventStateSources(): Array<keyof TSources>;
6623
6725
  /**
6624
6726
  * Per-source events surface.
6625
6727
  *
@@ -6692,33 +6794,6 @@ export declare const customGeoJSONKnobCatalogue: readonly CustomGeoJSONKnob[];
6692
6794
  */
6693
6795
  export declare const customGeoJSONKnobIds: readonly CustomGeoJSONKnobId[];
6694
6796
  //#endregion
6695
- //#region src/geometry/layers/colorPalettes.d.ts
6696
- export declare const colorPalettes: {
6697
- warm: string[];
6698
- browns: string[];
6699
- cold: string[];
6700
- fadedBlues: string[];
6701
- blues: string[];
6702
- greens: string[];
6703
- fadedGreenToBlue: string[];
6704
- blueToRed: string[];
6705
- greenToYellow: string[];
6706
- pastel: string[];
6707
- retro: string[];
6708
- contrastRetro: string[];
6709
- fadedRainbow: string[];
6710
- pastelRainbow: string[];
6711
- };
6712
- export type ColorPaletteOptions = keyof typeof colorPalettes;
6713
- export declare const colorPaletteIDs: ColorPaletteOptions[];
6714
- /**
6715
- * Adapts a fill palette for the active map theme. Light themes pass through unchanged; for dark
6716
- * themes each colour is nudged toward a mid, saturated tone — pale ramps are deepened so they read
6717
- * against the dark base map, near-black ramps are lifted so they don't vanish.
6718
- * @ignore
6719
- */
6720
- export declare const adaptPaletteForTheme: (colors: string[], lightDark: LightDark) => string[];
6721
- //#endregion
6722
6797
  //#region src/geometry/types/geometryFillStyle.d.ts
6723
6798
  /**
6724
6799
  * How {@link GeometriesModule} fills a polygon.
@@ -6749,8 +6824,8 @@ export declare const geometryFillStyles: readonly ["filled", "outline", "inverte
6749
6824
  * // Solid color with opacity
6750
6825
  * const fill: GeometryFillConfig = { color: '#FF5733', opacity: 0.3 };
6751
6826
  *
6752
- * // One colour per feature, in turn, from a palette
6753
- * const fill: GeometryFillConfig = { palette: 'blues', opacity: 0.25 };
6827
+ * // One colour per feature, in turn, from your own palette
6828
+ * const fill: GeometryFillConfig = { palette: ['#1d3f8a', '#e63312', '#f5d000'], opacity: 0.25 };
6754
6829
  *
6755
6830
  * // Data-driven color based on properties
6756
6831
  * const fill: GeometryFillConfig = {
@@ -6772,14 +6847,15 @@ export type GeometryFillConfig = {
6772
6847
  */
6773
6848
  color?: string | ExpressionSpecification;
6774
6849
  /**
6775
- * Named palette the features take their fill colours from, one per feature in turn
6776
- * (see {@link colorPaletteIDs}). On dark map styles its colours are adapted to stay legible.
6850
+ * CSS colours the features are filled with, one per feature in turn, starting over after the last.
6851
+ * An empty list counts as unset.
6777
6852
  *
6778
6853
  * @remarks
6779
6854
  * Overrides the top-level {@link GeometriesModuleConfig.color}, for the fill and the border; the
6780
- * full order is on the latter.
6855
+ * full order is on the latter. To follow a map theme, pass its colours — e.g.
6856
+ * `[colors.accent, colors.vegetation, colors.water]` from the map-theme plugin's `deriveMapColors`.
6781
6857
  */
6782
- palette?: ColorPaletteOptions;
6858
+ palette?: string[];
6783
6859
  /**
6784
6860
  * Fill opacity, 0 (transparent) to 1 (opaque). Also accepts a MapLibre expression.
6785
6861
  *
@@ -6905,11 +6981,43 @@ export type GeometryLineConfig = {
6905
6981
  */
6906
6982
  layer?: Partial<ToBeAddedLayerSpecTemplate<LineLayerSpecification>>;
6907
6983
  };
6984
+ /**
6985
+ * How a hovered or clicked geometry is drawn: a denser fill and a wider border, in its own colours.
6986
+ *
6987
+ * @remarks
6988
+ * The factors multiply the fill opacity and border width in force, the configured
6989
+ * {@link GeometryFillConfig.opacity | fill.opacity} and {@link GeometryLineConfig.width | line.width}
6990
+ * included; a `line.layer` `line-width` is drawn as given. The geometries draw their event states
6991
+ * once a handler covers them, or {@link GeometriesModule.putEventState} puts one.
6992
+ *
6993
+ * @example
6994
+ * ```typescript
6995
+ * // A bolder border alone
6996
+ * const highlight: GeometryHighlightConfig = { fillOpacityFactor: 1, lineWidthFactor: 2.5 };
6997
+ * ```
6998
+ *
6999
+ * @group Geometries
7000
+ */
7001
+ export type GeometryHighlightConfig = {
7002
+ /**
7003
+ * Multiplier on the fill opacity, at most opaque; `1` draws the fill as on any other geometry.
7004
+ * Clamped to 1 to 4.
7005
+ *
7006
+ * @defaultValue `2`
7007
+ */
7008
+ fillOpacityFactor?: number;
7009
+ /**
7010
+ * Multiplier on the border width; `1` draws the border as on any other geometry. Clamped to 1 to 3.
7011
+ *
7012
+ * @defaultValue `1.75`
7013
+ */
7014
+ lineWidthFactor?: number;
7015
+ };
6908
7016
  /**
6909
7017
  * Labels placed along the polygon border lines: the center label's fields, plus where along the
6910
7018
  * border they repeat.
6911
7019
  *
6912
- * When set, a symbol layer is added to the geometry source.
7020
+ * When set, the border labels are drawn, including when set after the module is created.
6913
7021
  *
6914
7022
  * @remarks
6915
7023
  * Defaults for the unset fields:
@@ -7077,6 +7185,10 @@ export type GeometriesModuleConfig = MapModuleCommonConfig & {
7077
7185
  * Controls the outline appearance of polygon geometries.
7078
7186
  */
7079
7187
  line?: GeometryLineConfig;
7188
+ /**
7189
+ * How a hovered or clicked geometry is drawn.
7190
+ */
7191
+ highlight?: GeometryHighlightConfig;
7080
7192
  /**
7081
7193
  * Layer positioning configuration.
7082
7194
  *
@@ -7128,9 +7240,8 @@ export type GeometriesModuleConfig = MapModuleCommonConfig & {
7128
7240
  * properties from domain data.
7129
7241
  *
7130
7242
  * @remarks
7131
- * Used internally by {@link reachableRangeGeometryConfig} to generate budget
7132
- * labels (e.g. `'30 min'`) from feature properties. For most use cases,
7133
- * the standard config fields (`fill`, `label`, `fillStyle`) suffice.
7243
+ * For most use cases the standard config fields (`fill`, `label`, `fillStyle`) suffice. Reachable
7244
+ * ranges have their own module, {@link ReachableRangesModule}, which titles and colours each band.
7134
7245
  *
7135
7246
  * @example
7136
7247
  * ```typescript
@@ -7167,7 +7278,7 @@ export type GeometriesModuleConfig = MapModuleCommonConfig & {
7167
7278
  */
7168
7279
  export type GeometriesModuleSerializableConfig = Omit<GeometriesModuleConfig, 'transformFeaturesForDisplay'>;
7169
7280
  //#endregion
7170
- //#region src/geometry/GeometriesModule.d.ts
7281
+ //#region src/geometry/AbstractGeometriesModule.d.ts
7171
7282
  /**
7172
7283
  * IDs of sources and layers from a geometry module.
7173
7284
  */
@@ -7176,17 +7287,157 @@ type GeometrySourcesWithLayers = {
7176
7287
  geometryLabel: GeoJSONSourceWithLayers<FeatureCollection<Point>>;
7177
7288
  };
7178
7289
  /**
7179
- * Event surface of {@link GeometriesModule}: the module's own events, plus one named scope per
7180
- * surface it manages.
7290
+ * Event surface of a polygon module ({@link GeometriesModule}, {@link ReachableRangesModule}): the
7291
+ * module's own events, plus one named scope per surface it manages.
7181
7292
  *
7182
7293
  * @group Geometries
7183
7294
  */
7184
- export type GeometriesEvents = CombinedEvents<MapGeoJSONFeature, GeometriesModuleConfig, PolygonFeatures> & {
7185
- /** The geometry fills and outlines. */
7186
- geometry: UserEvents<MapGeoJSONFeature>;
7187
- /** The labels rendered on top of the geometries. */
7188
- geometryLabel: UserEvents<MapGeoJSONFeature>;
7295
+ export type GeometriesEvents<CFG = GeometriesModuleConfig> = CombinedEvents<MapGeoJSONFeature, CFG, PolygonFeatures> & {
7296
+ /** The fills and outlines. */
7297
+ geometry: UserEventsWithStates<MapGeoJSONFeature>;
7298
+ /** The labels rendered on top of them. */
7299
+ geometryLabel: UserEventsWithStates<MapGeoJSONFeature>;
7189
7300
  };
7301
+ /**
7302
+ * Base of the modules that draw polygons with the geometry layers — fills, borders, border labels and
7303
+ * titles: {@link GeometriesModule} and {@link ReachableRangesModule}.
7304
+ *
7305
+ * @remarks
7306
+ * A subclass says how its own config reads as the geometry layers' ({@link displayConfig}) and how
7307
+ * what it is shown becomes the polygons drawn ({@link prepareShown}); visibility, layer ordering,
7308
+ * events and restoring after a style change are shared.
7309
+ *
7310
+ * @group Geometries
7311
+ */
7312
+ export declare abstract class AbstractGeometriesModule<CFG extends MapModuleCommonConfig & Pick<GeometriesModuleConfig, 'visible' | 'beforeLayerConfig' | 'highlight'>> extends AbstractDataOwnedMapModule<GeometrySourcesWithLayers, CFG> {
7313
+ private titleLayerSpecs;
7314
+ private geometryFillLayerSpecs;
7315
+ private geometryOutlineLayerSpecs;
7316
+ private lineLabelLayerSpecs;
7317
+ private sourceID;
7318
+ private fillLayerID;
7319
+ private outlineLayerID;
7320
+ private lineLabelLayerID;
7321
+ private titleSourceID;
7322
+ private titleLayerID;
7323
+ private lastRawInput;
7324
+ private readonly shownFeaturesHandlers;
7325
+ protected constructor(map: TomTomMap, config?: CFG);
7326
+ /**
7327
+ * What the ids of this module's sources and layers start with, before the instance index. Unique
7328
+ * per subclass, whose instances are counted apart.
7329
+ * @ignore
7330
+ */
7331
+ protected abstract get idPrefix(): string;
7332
+ /**
7333
+ * The geometry layers' config for this module's own. Called while the module is constructed, so it
7334
+ * reads nothing but `config`.
7335
+ * @ignore
7336
+ */
7337
+ protected abstract displayConfig(config: CFG | undefined): GeometriesModuleConfig | undefined;
7338
+ /**
7339
+ * The polygons drawn for what `show` was given, before the geometry layers' own preparation.
7340
+ * @ignore
7341
+ */
7342
+ protected abstract prepareShown(input: PolygonFeatures, config: CFG | undefined): PolygonFeatures;
7343
+ /** Current light/dark map theme, re-read on every layer/data build so style switches repaint. */
7344
+ protected get lightDark(): LightDark;
7345
+ /**
7346
+ * The map's colour for what carries no `color` under a config without a top-level `color`: the
7347
+ * accent when a theme has set one, otherwise a colour that follows the active light/dark theme.
7348
+ */
7349
+ protected get defaultColor(): string;
7350
+ /**
7351
+ * @ignore
7352
+ */
7353
+ protected _initSourcesWithLayers(config?: CFG, restore?: boolean): GeometrySourcesWithLayers;
7354
+ /**
7355
+ * @ignore
7356
+ */
7357
+ protected _applyConfig(config: CFG | undefined): CFG | undefined;
7358
+ /** @ignore */
7359
+ protected applyVisibility(config: CFG | undefined): void;
7360
+ private get partLayerIDs();
7361
+ private applyBeforeLayerConfig;
7362
+ private updateLayers;
7363
+ /**
7364
+ * @ignore
7365
+ */
7366
+ protected discardShownData(): void;
7367
+ /**
7368
+ * @ignore
7369
+ */
7370
+ protected restoreDataAndConfigImpl(): void;
7371
+ /**
7372
+ * Draws what `show` was last given again, prepared for `config`, keeping the identity of the
7373
+ * polygons `shown` before.
7374
+ * @ignore
7375
+ */
7376
+ protected displayAgain(config: CFG | undefined, shown: PolygonFeatures): void;
7377
+ private prepare;
7378
+ private display;
7379
+ /**
7380
+ * Replaces what the module shows; the subclass's `show`.
7381
+ * @ignore
7382
+ */
7383
+ protected showPolygons(input: PolygonFeatures): Promise<void>;
7384
+ /**
7385
+ * Removes everything the module shows.
7386
+ *
7387
+ * @remarks
7388
+ * - Clears both the polygons and their labels
7389
+ * - Does not reset styling configuration
7390
+ * - Module remains initialized and ready for new data
7391
+ *
7392
+ * @example
7393
+ * ```typescript
7394
+ * await module.clear();
7395
+ * await module.show(newData);
7396
+ * ```
7397
+ */
7398
+ clear(): Promise<void>;
7399
+ /**
7400
+ * Returns the polygons and labels currently drawn, as prepared for display.
7401
+ *
7402
+ * @example
7403
+ * ```typescript
7404
+ * const shown = module.getShown();
7405
+ * console.log(`Polygons: ${shown.geometry.features.length}`);
7406
+ * ```
7407
+ */
7408
+ getShown(): {
7409
+ geometry: PolygonFeatures;
7410
+ geometryLabel: FeatureCollection<Point, GeoJsonProperties>;
7411
+ };
7412
+ /** @ignore */
7413
+ protected eventStateSources(): (keyof GeometrySourcesWithLayers)[];
7414
+ /**
7415
+ * Gets the events interface for handling user interactions with the polygons.
7416
+ *
7417
+ * @returns The module's events, with `on` / `off` for handlers and `where` for scoping.
7418
+ *
7419
+ * @remarks
7420
+ * **Supported Events:**
7421
+ * - `click`: User clicks on a polygon
7422
+ * - `contextmenu`: User right-clicks on a polygon
7423
+ * - `hover`: Mouse enters a polygon
7424
+ * - `long-hover`: Mouse hovers over a polygon for extended time
7425
+ *
7426
+ * @example
7427
+ * ```typescript
7428
+ * module.events.on('click', (feature, lngLat) => {
7429
+ * console.log('Clicked:', feature.properties);
7430
+ * console.log('Location:', lngLat);
7431
+ * });
7432
+ *
7433
+ * // Only the polygons, not their labels
7434
+ * module.events.geometry.on('hover', (feature) => showTooltip(feature.properties.title));
7435
+ * ```
7436
+ */
7437
+ get events(): GeometriesEvents<CFG>;
7438
+ }
7439
+ //#endregion
7440
+ //#region src/geometry/GeometriesModule.d.ts
7190
7441
  /**
7191
7442
  * Geometries Module for displaying polygon areas with custom styling on the map.
7192
7443
  *
@@ -7208,9 +7459,10 @@ export type GeometriesEvents = CombinedEvents<MapGeoJSONFeature, GeometriesModul
7208
7459
  * - Accepts GeoJSON Polygon and MultiPolygon features
7209
7460
  * - Supports FeatureCollection for multiple geometries
7210
7461
  * - Compatible with TomTom Search API geometry results
7462
+ * - Reachable ranges have a module of their own, {@link ReachableRangesModule}
7211
7463
  *
7212
7464
  * **Styling:**
7213
- * - Use predefined color palettes or custom colors
7465
+ * - One colour, a palette of your own, or the map's accent by default
7214
7466
  * - Apply MapLibre expressions for dynamic styling
7215
7467
  * - Per-feature styling via feature properties
7216
7468
  *
@@ -7286,19 +7538,7 @@ export type GeometriesEvents = CombinedEvents<MapGeoJSONFeature, GeometriesModul
7286
7538
  *
7287
7539
  * @group Geometries
7288
7540
  */
7289
- export declare class GeometriesModule extends AbstractDataOwnedMapModule<GeometrySourcesWithLayers, GeometriesModuleConfig> {
7290
- private titleLayerSpecs;
7291
- private geometryFillLayerSpecs;
7292
- private geometryOutlineLayerSpecs;
7293
- private lineLabelLayerSpecs;
7294
- private sourceID;
7295
- private fillLayerID;
7296
- private outlineLayerID;
7297
- private lineLabelLayerID;
7298
- private titleSourceID;
7299
- private titleLayerID;
7300
- private lastRawInput;
7301
- private readonly shownFeaturesHandlers;
7541
+ export declare class GeometriesModule extends AbstractGeometriesModule<GeometriesModuleConfig> {
7302
7542
  /**
7303
7543
  * Make sure the map is ready before create an instance of the module and any other interaction with the map
7304
7544
  * @param tomtomMap The TomTomMap instance.
@@ -7358,83 +7598,12 @@ export declare class GeometriesModule extends AbstractDataOwnedMapModule<Geometr
7358
7598
  */
7359
7599
  static create(tomtomMap: TomTomMap, config?: GeometriesModuleConfig): Promise<GeometriesModule>;
7360
7600
  private constructor();
7361
- /** Current light/dark map theme, re-read on every layer/data build so style switches repaint. */
7362
- private get lightDark();
7363
- /**
7364
- * The map's fill / plain-outline colour for a feature that carries no `color` and a config without
7365
- * a top-level `color`: the published accent when a theme has set one, otherwise a colour that
7366
- * follows the active light/dark theme.
7367
- */
7368
- private get defaultColor();
7369
- /**
7370
- * @ignore
7371
- */
7372
- protected _initSourcesWithLayers(config?: GeometriesModuleConfig, restore?: boolean): GeometrySourcesWithLayers;
7373
- /**
7374
- * @ignore
7375
- */
7376
- protected _applyConfig(config: GeometriesModuleConfig | undefined): GeometriesModuleConfig | undefined;
7377
7601
  /** @ignore */
7378
- protected applyVisibility(config: GeometriesModuleConfig | undefined): void;
7379
- private get partLayerIDs();
7380
- /**
7381
- * Positions the geometry layers relative to other map layers.
7382
- *
7383
- * @param layerConfig - Layer positioning. A single {@link BeforeLayerConfig} (`'top'` or a layer
7384
- * id) moves all geometry layers together; the record form (`{ all?, fill?, line? }`) positions the
7385
- * fill and border independently, leaving a part it names no target for where it is.
7386
- *
7387
- * **Available Layer IDs:** the keys of `mapStyleLayerIDs`.
7388
- *
7389
- * @example
7390
- * ```typescript
7391
- * // Place all geometry layers below labels
7392
- * geometries.moveBeforeLayer('lowestLabel');
7393
- *
7394
- * // Fill below the road network, border on top
7395
- * geometries.moveBeforeLayer({ fill: 'lowestRoadLine', line: 'top' });
7396
- * ```
7397
- */
7398
- moveBeforeLayer(layerConfig: GeometryBeforeLayerConfig): void;
7399
- private applyBeforeLayerConfig;
7400
- /**
7401
- * Updates the label at the center of each displayed geometry: its text and styling.
7402
- *
7403
- * @param label - New label configuration.
7404
- *
7405
- * @remarks
7406
- * **Configuration:**
7407
- * - `text`: label text, a string or a MapLibre expression; the feature's `title` when unset
7408
- * - `size`, `color`, `haloColor`, `haloWidth`, `opacity`, `font`: label styling
7409
- * - Changes apply to currently shown and future geometries
7410
- *
7411
- * @example
7412
- * ```typescript
7413
- * // Show feature property as label
7414
- * geometries.applyLabelConfig({
7415
- * text: ['get', 'name']
7416
- * });
7417
- *
7418
- * // Conditional labels, in white
7419
- * geometries.applyLabelConfig({
7420
- * text: [
7421
- * 'case',
7422
- * ['has', 'label'],
7423
- * ['get', 'label'],
7424
- * ['get', 'title']
7425
- * ],
7426
- * color: '#FFFFFF',
7427
- * });
7428
- * ```
7429
- */
7430
- applyLabelConfig(label: GeometryLabelConfig): void;
7431
- private updateLayers;
7432
- /**
7433
- * @ignore
7434
- */
7435
- protected discardShownData(): void;
7436
- private prepare;
7437
- private display;
7602
+ protected get idPrefix(): string;
7603
+ /** @ignore */
7604
+ protected displayConfig(config: GeometriesModuleConfig | undefined): GeometriesModuleConfig | undefined;
7605
+ /** @ignore */
7606
+ protected prepareShown(geometries: PolygonFeatures, config: GeometriesModuleConfig | undefined): PolygonFeatures;
7438
7607
  /**
7439
7608
  * Displays the given polygon geometries on the map.
7440
7609
  *
@@ -7492,114 +7661,9 @@ export declare class GeometriesModule extends AbstractDataOwnedMapModule<Geometr
7492
7661
  * ```
7493
7662
  */
7494
7663
  show(geometries: PolygonFeatures): Promise<void>;
7495
- /**
7496
- * Removes all geometries from the map.
7497
- *
7498
- * @remarks
7499
- * - Clears both geometry layers and labels
7500
- * - Does not reset styling configuration
7501
- * - Module remains initialized and ready for new data
7502
- *
7503
- * @example
7504
- * ```typescript
7505
- * // Clear displayed geometries
7506
- * await geometries.clear();
7507
- *
7508
- * // Show new geometries
7509
- * await geometries.show(newGeometries);
7510
- * ```
7511
- */
7512
- clear(): Promise<void>;
7513
- /**
7514
- * Returns the currently shown geometries.
7515
- *
7516
- * @returns The geometries currently displayed on the map.
7517
- *
7518
- * @remarks
7519
- * Returns the exact data that was passed to the `show()` method.
7520
- *
7521
- * @example
7522
- * ```typescript
7523
- * const shown = geometriesModule.getShown();
7524
- * console.log(`Geometries: ${shown.geometry.features.length}`);
7525
- * ```
7526
- */
7527
- getShown(): {
7528
- geometry: PolygonFeatures;
7529
- geometryLabel: FeatureCollection<Point, GeoJsonProperties>;
7530
- };
7531
- /**
7532
- * Gets the events interface for handling user interactions with geometries.
7533
- *
7534
- * @returns The module's events, with `on` / `off` for handlers and `where` for scoping.
7535
- *
7536
- * @remarks
7537
- * **Supported Events:**
7538
- * - `click`: User clicks on a geometry
7539
- * - `contextmenu`: User right-clicks on a geometry
7540
- * - `hover`: Mouse enters a geometry
7541
- * - `long-hover`: Mouse hovers over geometry for extended time
7542
- *
7543
- * **Event Features:**
7544
- * - Receive the original feature data passed to `show()`
7545
- * - Access feature properties and geometry
7546
- * - Get click/hover coordinates
7547
- *
7548
- * @example
7549
- * Basic event handling:
7550
- * ```typescript
7551
- * geometries.events.on('click', (feature, lngLat) => {
7552
- * console.log('Clicked:', feature.properties);
7553
- * console.log('Location:', lngLat);
7554
- * });
7555
- * ```
7556
- *
7557
- * @example
7558
- * Multiple handlers:
7559
- * ```typescript
7560
- * // Highlight on hover
7561
- * geometries.events.on('hover', (feature) => {
7562
- * highlightGeometry(feature.id);
7563
- * });
7564
- *
7565
- * // Show details on click
7566
- * geometries.events.on('click', (feature) => {
7567
- * showDetailPanel(feature.properties);
7568
- * });
7569
- *
7570
- * // Context menu
7571
- * geometries.events.on('contextmenu', (feature, lngLat) => {
7572
- * showContextMenu(lngLat, feature);
7573
- * });
7574
- * ```
7575
- */
7576
- get events(): GeometriesEvents;
7577
7664
  }
7578
7665
  //#endregion
7579
7666
  //#region src/geometry/types/geometryConfigOptions.d.ts
7580
- /**
7581
- * Custom title generator for reachable range features: the text of each range's labels.
7582
- *
7583
- * @group Geometries
7584
- */
7585
- export type ReachableRangeTitleFn = (feature: PolygonFeature, index: number) => string;
7586
- /**
7587
- * Options of {@link prepareReachableRangesForDisplay}.
7588
- *
7589
- * @group Geometries
7590
- */
7591
- export type ReachableRangesDisplayOptions = {
7592
- /**
7593
- * How each range is filled.
7594
- *
7595
- * @default 'filled'
7596
- */
7597
- fillStyle?: GeometryFillStyle;
7598
- /**
7599
- * Each range's title, shown by its labels. Unset, it is the feature's `budget`, e.g. `'30 min'`.
7600
- */
7601
- title?: ReachableRangeTitleFn;
7602
- };
7603
7667
  /**
7604
7668
  * Options of {@link fillStyledGeometryConfig}.
7605
7669
  *
@@ -7607,11 +7671,10 @@ export type ReachableRangesDisplayOptions = {
7607
7671
  */
7608
7672
  export type FillStyledGeometryConfigOptions = {
7609
7673
  /**
7610
- * Color palette for polygon fills.
7611
- *
7612
- * @default 'fadedRainbow'
7674
+ * CSS colours the features are filled with, one per feature in turn. Unset, they draw in the
7675
+ * module's default colour, the map's accent when a theme sets one ({@link GeometriesModuleConfig.color}).
7613
7676
  */
7614
- palette?: ColorPaletteOptions;
7677
+ palette?: NonNullable<GeometryFillConfig['palette']>;
7615
7678
  /**
7616
7679
  * Layer positioning.
7617
7680
  *
@@ -7619,61 +7682,38 @@ export type FillStyledGeometryConfigOptions = {
7619
7682
  */
7620
7683
  beforeLayerConfig?: GeometryBeforeLayerConfig;
7621
7684
  };
7622
- /**
7623
- * Options of {@link reachableRangeGeometryConfig}: the palette and positioning of
7624
- * {@link fillStyledGeometryConfig}, and how {@link prepareReachableRangesForDisplay} fills and titles
7625
- * each range.
7626
- *
7627
- * @group Geometries
7628
- */
7629
- export type ReachableRangeGeometryConfigOptions = FillStyledGeometryConfigOptions & ReachableRangesDisplayOptions;
7630
7685
  //#endregion
7631
7686
  //#region src/geometry/geometryConfigs.d.ts
7632
7687
  /**
7633
- * Config that draws each polygon by its own fill style, with palette-based coloring.
7688
+ * Config that draws each polygon by its own fill style, optionally coloured from a palette.
7634
7689
  *
7635
7690
  * Includes data-driven expressions so each feature's `fillStyle` property controls its
7636
7691
  * styling, line labels config, and positions layers below map labels.
7637
7692
  *
7638
- * For reachable ranges, use {@link reachableRangeGeometryConfig} which extends this
7639
- * with auto-generated labels.
7693
+ * Reachable ranges have their own module, {@link ReachableRangesModule}, drawn in these styles too.
7640
7694
  *
7641
7695
  * @example
7642
7696
  * ```typescript
7643
- * const zones = await GeometriesModule.create(map, fillStyledGeometryConfig({ palette: 'retro' }));
7697
+ * const zones = await GeometriesModule.create(map, fillStyledGeometryConfig({ palette: ['#e63312', '#1d3f8a'] }));
7644
7698
  * ```
7645
7699
  *
7646
7700
  * @group Geometries
7647
7701
  */
7648
7702
  export declare const fillStyledGeometryConfig: ({ palette, beforeLayerConfig }?: FillStyledGeometryConfigOptions) => GeometriesModuleConfig;
7649
- /**
7650
- * Returns a {@link GeometriesModuleConfig} for reachable ranges.
7651
- *
7652
- * Builds on {@link fillStyledGeometryConfig} and overrides `transformFeaturesForDisplay` so the
7653
- * raw output of `calculateReachableRanges` can be passed directly to {@link GeometriesModule.show}
7654
- * — titles are derived from each feature's `budget` property.
7655
- *
7656
- * @example
7657
- * ```typescript
7658
- * const module = await GeometriesModule.create(map, reachableRangeGeometryConfig());
7659
- * const result = await calculateReachableRanges([...]);
7660
- * module.show(result); // titles and fill style applied automatically
7661
- *
7662
- * module.applyConfig(reachableRangeGeometryConfig({ palette: 'cold', fillStyle: 'inverted' }));
7663
- * ```
7664
- *
7665
- * @group Geometries
7666
- */
7667
- export declare const reachableRangeGeometryConfig: ({ palette, beforeLayerConfig, fillStyle, title }?: ReachableRangeGeometryConfigOptions) => GeometriesModuleConfig;
7668
7703
  //#endregion
7669
7704
  //#region src/geometry/types/geometriesKnobs.d.ts
7705
+ /**
7706
+ * The style fields both geometry labels share, as knobs: the {@link LabelConfig} fields.
7707
+ * @ignore
7708
+ */
7709
+ type GeometryLabelKnobLeaf = keyof LabelConfig;
7670
7710
  /**
7671
7711
  * The id of a geometries knob: its path into {@link GeometriesModuleConfig}, e.g. `fill.opacity` or
7672
7712
  * `lineLabel.minZoom`. See {@link geometriesKnobCatalogue} for what each one does.
7673
7713
  *
7674
7714
  * @group Geometries
7675
7715
  */
7676
- type GeometriesKnobId = 'color' | 'visible' | 'fillStyle' | `fill.${keyof GeometryFillConfig}` | `line.${Exclude<keyof GeometryLineConfig, 'layer'>}` | `label.${Exclude<keyof GeometryLabelConfig, 'text'>}` | `lineLabel.${Exclude<keyof GeometryLineLabelConfig, 'text'>}`;
7716
+ type GeometriesKnobId = 'color' | 'visible' | 'fillStyle' | `fill.${keyof GeometryFillConfig}` | `line.${Exclude<keyof GeometryLineConfig, 'layer'>}` | `highlight.${keyof GeometryHighlightConfig}` | `label.${Exclude<keyof GeometryLabelConfig, 'text'>}` | `lineLabel.${Exclude<keyof GeometryLineLabelConfig, 'text'>}`;
7677
7717
  /**
7678
7718
  * The value type a given geometries knob takes: the plain value its path holds in
7679
7719
  * {@link GeometriesModuleConfig}. The MapLibre expressions the config also takes there are not knob
@@ -7689,13 +7729,136 @@ type GeometriesKnobValueOf<ID extends GeometriesKnobId> = KnobPlainValue<ValueAt
7689
7729
  *
7690
7730
  * @group Geometries
7691
7731
  */
7692
- type GeometriesKnob = KnobEntry<GeometriesKnobId, Exclude<KnobKind, 'colors'>>;
7732
+ type GeometriesKnob = KnobEntry<GeometriesKnobId, Exclude<KnobKind, 'image' | 'text'>>;
7733
+ //#endregion
7734
+ //#region src/geometry/types/reachableRangesModuleConfig.d.ts
7735
+ /**
7736
+ * The text of a reachable range's labels.
7737
+ *
7738
+ * @param feature - The range, as given to {@link ReachableRangesModule.show}.
7739
+ * @param index - Its position in what `show` was given.
7740
+ *
7741
+ * @group Geometries
7742
+ */
7743
+ export type ReachableRangeTitleFn = (feature: PolygonFeature, index: number) => string;
7744
+ /**
7745
+ * Configuration of the {@link ReachableRangesModule}.
7746
+ *
7747
+ * @remarks
7748
+ * The bands take their colours from the map unless {@link ReachableRangesModuleConfig.palette | palette}
7749
+ * sets them: a ramp from the map's accent (innermost band) toward its land colour (outermost), reversed
7750
+ * for the `'inverted'` fill style, both read from {@link TomTomMap.mapColors}. A theme set through `StylingModule.setMapColors` — e.g. from
7751
+ * the map-theme plugin's `deriveMapColors` — recolours the bands with the rest of the map. Without one,
7752
+ * the ramp runs between the map style's own light or dark defaults: `'#0A3653'` toward white on light
7753
+ * styles, `'#5FA8D8'` toward `'#333333'` on dark ones (custom styles count as light), and follows a
7754
+ * switch between them.
7755
+ *
7756
+ * @example
7757
+ * ```typescript
7758
+ * // The area outside the 30-minute range dimmed, in your own colours
7759
+ * const config: ReachableRangesModuleConfig = {
7760
+ * fillStyle: 'inverted',
7761
+ * palette: ['#e63312', '#f5a000', '#1d3f8a'],
7762
+ * };
7763
+ * ```
7764
+ *
7765
+ * @see {@link ReachableRangesModuleSerializableConfig} for the part that survives JSON.
7766
+ *
7767
+ * @group Geometries
7768
+ */
7769
+ export type ReachableRangesModuleConfig = MapModuleCommonConfig & {
7770
+ /**
7771
+ * Whether the module draws anything: bands, borders and their labels.
7772
+ *
7773
+ * @remarks
7774
+ * `show()` and `clear()` never change it — a hidden module keeps its ranges until
7775
+ * {@link ReachableRangesModule.setVisible} shows it again.
7776
+ *
7777
+ * @default true
7778
+ */
7779
+ visible?: boolean;
7780
+ /**
7781
+ * How the bands are filled.
7782
+ *
7783
+ * - `'filled'` — each band coloured, the innermost on top.
7784
+ * - `'outline'` — only each range's border, thick and coloured.
7785
+ * - `'inverted'` — the area **outside** each range coloured: the world beyond the largest range,
7786
+ * then a ring between each range and the next smaller one.
7787
+ *
7788
+ * @default 'filled'
7789
+ */
7790
+ fillStyle?: GeometryFillStyle;
7791
+ /**
7792
+ * CSS colours of the bands, the innermost band first, starting over after the last. An empty list
7793
+ * counts as unset: the bands then ramp from the map's accent toward its land colour, the other way
7794
+ * round for `'inverted'`, which deepens away from the origin.
7795
+ *
7796
+ * @remarks
7797
+ * Bands are ranked per origin, so with several origins the ranges of the same rank share a colour.
7798
+ */
7799
+ palette?: string[];
7800
+ /**
7801
+ * How the labels along each range's border look. Their text is the range's title.
7802
+ */
7803
+ label?: LabelConfig;
7804
+ /**
7805
+ * How a hovered or clicked band is drawn.
7806
+ */
7807
+ highlight?: GeometryHighlightConfig;
7808
+ /**
7809
+ * Where the bands sit in the map's layer stack: a single target, or `{ all, fill, line }` to
7810
+ * place the fill and the borders apart.
7811
+ *
7812
+ * @default 'lowestLabel'
7813
+ */
7814
+ beforeLayerConfig?: GeometryBeforeLayerConfig;
7815
+ /**
7816
+ * Each range's title, the text of its labels. Unset, it is the range's `budget`, e.g. `'30 min'`
7817
+ * or `'10 km'`, else its position in what `show` was given, from 1.
7818
+ */
7819
+ title?: ReachableRangeTitleFn;
7820
+ };
7821
+ /**
7822
+ * The part of a {@link ReachableRangesModuleConfig} that survives JSON, for saving `getConfig()` and
7823
+ * replaying it with `applyConfig()`.
7824
+ *
7825
+ * @remarks
7826
+ * It leaves out `title`, a function, which a replay adds back in code.
7827
+ *
7828
+ * @group Geometries
7829
+ */
7830
+ export type ReachableRangesModuleSerializableConfig = Omit<ReachableRangesModuleConfig, 'title'>;
7831
+ //#endregion
7832
+ //#region src/geometry/types/reachableRangesKnobs.d.ts
7833
+ /**
7834
+ * The id of a reachable ranges knob: its path into {@link ReachableRangesModuleConfig}, e.g. `palette`
7835
+ * or `label.size`. See {@link reachableRangesKnobCatalogue} for what each one does.
7836
+ *
7837
+ * @group Geometries
7838
+ */
7839
+ type ReachableRangesKnobId = 'visible' | 'fillStyle' | 'palette' | `highlight.${keyof GeometryHighlightConfig}` | `label.${GeometryLabelKnobLeaf}`;
7840
+ /**
7841
+ * The value type a given reachable ranges knob takes: the plain value its path holds in
7842
+ * {@link ReachableRangesModuleConfig}. The MapLibre expressions the config also takes there are not
7843
+ * knob values.
7844
+ *
7845
+ * @group Geometries
7846
+ */
7847
+ type ReachableRangesKnobValueOf<ID extends ReachableRangesKnobId> = KnobPlainValue<ValueAt<ReachableRangesModuleConfig, ID>>;
7848
+ /**
7849
+ * One entry of {@link reachableRangesKnobCatalogue}. The value in force is the one at its path in
7850
+ * {@link ReachableRangesModule.getConfig}, else its `default`; with neither, the map style or the
7851
+ * map's colours decide.
7852
+ *
7853
+ * @group Geometries
7854
+ */
7855
+ type ReachableRangesKnob = KnobEntry<ReachableRangesKnobId, Exclude<KnobKind, 'offset' | 'image' | 'text'>>;
7693
7856
  //#endregion
7694
7857
  //#region src/geometry/knobCatalogue.d.ts
7695
7858
  /**
7696
7859
  * Every geometries knob with its kind, description, range or options and, where one value holds
7697
- * everywhere, its default: the module-wide knobs, the fill and border, then the center and border
7698
- * labels. Static data, readable with no map loaded.
7860
+ * everywhere, its default: the module-wide knobs, the fill and border, how a hovered or clicked
7861
+ * geometry draws them, then the center and border labels. Static data, readable with no map loaded.
7699
7862
  *
7700
7863
  * @remarks
7701
7864
  * A knob is a plain display value in {@link GeometriesModuleConfig}, at the path its id names. Not
@@ -7712,55 +7875,116 @@ export declare const geometriesKnobCatalogue: readonly GeometriesKnob[];
7712
7875
  * @group Geometries
7713
7876
  */
7714
7877
  export declare const geometriesKnobIds: readonly GeometriesKnobId[];
7715
- //#endregion
7716
- //#region src/geometry/prepareReachableRangesForDisplay.d.ts
7717
7878
  /**
7718
- * Attaches labels and applies fill-style-specific geometry to reachable range polygon features.
7879
+ * Every reachable ranges knob with its kind, description, range or options and, where one value holds
7880
+ * everywhere, its default: the module-wide knobs, how a hovered or clicked band draws, then the labels
7881
+ * along each range's border. Static data, readable with no map loaded.
7719
7882
  *
7720
- * Features must be ordered **largest budget first** (e.g. 30 min, 20 min, 10 min).
7721
- * For the `inverted` fill style, polygons are converted to donuts and one extra innermost feature is appended.
7722
- *
7723
- * @param features Polygon features from `calculateReachableRange`, ordered largest budget first.
7724
- * @param labels Label per feature in matching order (e.g. `['30 min', '20 min', '10 min']`).
7725
- * @param fillStyle Fill style. Defaults to `'filled'`.
7726
- *
7727
- * @example
7728
- * ```typescript
7729
- * const features = [range30min, range20min, range10min];
7730
- * const labels = ['30 min', '20 min', '10 min'];
7883
+ * @remarks
7884
+ * A knob is a plain display value in {@link ReachableRangesModuleConfig}, at the path its id names.
7885
+ * Not knobs: `beforeLayerConfig` and `title`, which take structured or function values; and `events`.
7731
7886
  *
7732
- * module.show({
7733
- * type: 'FeatureCollection',
7734
- * features: buildReachableRangeFeatures(features, labels, 'inverted'),
7735
- * });
7736
- * ```
7887
+ * @group Geometries
7888
+ */
7889
+ export declare const reachableRangesKnobCatalogue: readonly ReachableRangesKnob[];
7890
+ /**
7891
+ * Every reachable ranges knob id, in catalogue order.
7737
7892
  *
7738
7893
  * @group Geometries
7739
7894
  */
7740
- export declare const buildReachableRangeFeatures: (features: PolygonFeature[], labels: string[], fillStyle?: GeometryFillStyle) => PolygonFeature[];
7895
+ export declare const reachableRangesKnobIds: readonly ReachableRangesKnobId[];
7896
+ //#endregion
7897
+ //#region src/geometry/ReachableRangesModule.d.ts
7741
7898
  /**
7742
- * Prepares the output of `calculateReachableRanges` for display with {@link GeometriesModule}.
7899
+ * Event surface of {@link ReachableRangesModule}: the module's own events, plus one named scope per
7900
+ * surface it manages.
7743
7901
  *
7744
- * Derives titles from each feature's `budget` property by default, applies fill-style-specific
7745
- * geometry, and preserves the bounding box. Pass the returned value directly to `module.show()`.
7902
+ * @group Geometries
7903
+ */
7904
+ export type ReachableRangesEvents = GeometriesEvents<ReachableRangesModuleConfig>;
7905
+ /**
7906
+ * Reachable Ranges Module: the areas reachable from one or more origins within a budget of time,
7907
+ * distance, fuel or charge, as `calculateReachableRanges` returns them, drawn as bands.
7746
7908
  *
7747
- * Note: when using {@link reachableRangeGeometryConfig} this is called automatically — you only
7748
- * need this function for explicit control over titles or fill style.
7909
+ * @remarks
7910
+ * **What it does for you:**
7911
+ * - Titles each range from its budget (`'30 min'`, `'10 km'`, `'20 % remaining'`) and labels its border
7912
+ * - Ranks the ranges of each origin, innermost first, and colours them by rank
7913
+ * - Draws them in any order given: a smaller range always sits on top of the larger ones around it
7914
+ * - With `fillStyle: 'inverted'`, dims the world outside the largest range of every origin and draws a
7915
+ * ring outside each smaller one
7749
7916
  *
7750
- * Features must be ordered **largest budget first** (e.g. 30 min, 20 min, 10 min).
7917
+ * **Colours:** the bands ramp from the map's accent (innermost) toward its land colour (outermost),
7918
+ * both read from {@link TomTomMap.mapColors} and followed as they change — so a theme set with
7919
+ * `StylingModule.setMapColors`, e.g. from the map-theme plugin's `deriveMapColors`, recolours the
7920
+ * bands too. {@link ReachableRangesModuleConfig.palette | palette} sets your own instead.
7751
7921
  *
7752
- * @param result Raw output of `calculateReachableRanges`.
7922
+ * **Multiple Instances:** the module owns the sources and layers it adds, suffixed per instance, so
7923
+ * several can share a map.
7753
7924
  *
7754
7925
  * @example
7755
7926
  * ```typescript
7756
- * // explicit control:
7757
- * module.show(prepareReachableRangesForDisplay(result, { fillStyle: 'inverted' }));
7758
- * module.show(prepareReachableRangesForDisplay(result, { title: (feature) => myTitle(feature) }));
7927
+ * import { calculateReachableRanges } from '@tomtom-org/maps-sdk/services';
7928
+ * import { ReachableRangesModule } from '@tomtom-org/maps-sdk/map';
7929
+ *
7930
+ * const ranges = await ReachableRangesModule.create(map);
7931
+ * await ranges.show(
7932
+ * await calculateReachableRanges(
7933
+ * [10, 20, 30].map((value) => ({ origin: [4.9, 52.37], budget: { type: 'timeMinutes', value } })),
7934
+ * ),
7935
+ * );
7936
+ *
7937
+ * ranges.applyConfig({ fillStyle: 'inverted' });
7759
7938
  * ```
7760
7939
  *
7940
+ * @see [Reachable Ranges Guide](https://docs.tomtom.com/maps-sdk-js/guides/services/routing/reachable-ranges)
7941
+ *
7761
7942
  * @group Geometries
7762
7943
  */
7763
- export declare const prepareReachableRangesForDisplay: (result: PolygonFeatures, { fillStyle, title }?: ReachableRangesDisplayOptions) => PolygonFeatures;
7944
+ export declare class ReachableRangesModule extends AbstractGeometriesModule<ReachableRangesModuleConfig> {
7945
+ /**
7946
+ * Waits for the map to be ready, then creates a new module on it.
7947
+ *
7948
+ * @param tomtomMap - The TomTomMap instance.
7949
+ * @param config - The module's configuration.
7950
+ * @returns A new, independent instance: every call adds its own sources and layers.
7951
+ *
7952
+ * @example
7953
+ * ```typescript
7954
+ * const ranges = await ReachableRangesModule.create(map, { fillStyle: 'outline' });
7955
+ * ```
7956
+ */
7957
+ static create(tomtomMap: TomTomMap, config?: ReachableRangesModuleConfig): Promise<ReachableRangesModule>;
7958
+ private constructor();
7959
+ /** @ignore */
7960
+ protected get idPrefix(): string;
7961
+ /** @ignore */
7962
+ protected displayConfig(config: ReachableRangesModuleConfig | undefined): GeometriesModuleConfig;
7963
+ /** @ignore */
7964
+ protected prepareShown(ranges: PolygonFeatures, config: ReachableRangesModuleConfig | undefined): PolygonFeatures;
7965
+ private get landColor();
7966
+ /**
7967
+ * Displays reachable ranges, replacing the ones shown.
7968
+ *
7969
+ * @param ranges - The ranges, as `calculateReachableRanges` returns them: any number of budgets,
7970
+ * from any number of origins, in any order. Each range's `budget` titles it and its `origin` groups
7971
+ * it with the others from the same place.
7972
+ *
7973
+ * @example
7974
+ * ```typescript
7975
+ * // Two origins, three budgets each, in one call
7976
+ * const origins = [[4.9, 52.37], [4.48, 51.92]];
7977
+ * await ranges.show(
7978
+ * await calculateReachableRanges(
7979
+ * origins.flatMap((origin) =>
7980
+ * [5, 10, 15].map((value) => ({ origin, budget: { type: 'distanceKM', value } })),
7981
+ * ),
7982
+ * ),
7983
+ * );
7984
+ * ```
7985
+ */
7986
+ show(ranges: PolygonFeatures): Promise<void>;
7987
+ }
7764
7988
  //#endregion
7765
7989
  //#region src/geometry/types/geometryDisplayProps.d.ts
7766
7990
  /**
@@ -8429,6 +8653,21 @@ type PlaceConnectionsConfig = {
8429
8653
  * metadata). When omitted, no label is rendered.
8430
8654
  */
8431
8655
  label?: (connection: PlaceConnectionDisplay) => string;
8656
+ /**
8657
+ * Colour of the connection lines, over the module's {@link PlacesModuleConfig.color}. Unset, they
8658
+ * take that colour, else the map's accent, else a blue that follows the light/dark theme.
8659
+ */
8660
+ color?: string;
8661
+ /**
8662
+ * Colour of the labels along the lines. Unset: a darker shade of the line colour on a light
8663
+ * map, a lighter one on a dark map.
8664
+ */
8665
+ textColor?: string;
8666
+ /**
8667
+ * Colour of the halo around the labels. Unset: `'#FFFFFF'` on a light map, `'#333333'` on a dark
8668
+ * one, as for the places' own labels.
8669
+ */
8670
+ haloColor?: string;
8432
8671
  /**
8433
8672
  * Custom MapLibre layer specifications for connection line and label.
8434
8673
  */
@@ -8640,6 +8879,33 @@ type PlaceEntryPointsConfig = {
8640
8879
  */
8641
8880
  layers?: PlaceEntryPointsLayersConfig;
8642
8881
  };
8882
+ /**
8883
+ * Where the places module's layers sit in the map's layer stack: one target for everything it
8884
+ * draws, or one per part of it.
8885
+ *
8886
+ * @remarks
8887
+ * The parts, named after the module's event scopes, and where each sits by default:
8888
+ * - `places` — the markers and their labels, selected places, clusters with their badges and
8889
+ * counts, and entry points. Above the map's layers, except the small POI dots the `base-map` and
8890
+ * `pin-clustered` marker types draw, which sit below the map's place labels. A target puts them
8891
+ * all beneath it, the dots right under the markers.
8892
+ * - `connections` — the lines {@link PlacesModule.showConnections} draws, and their labels. Below
8893
+ * the map's labels.
8894
+ *
8895
+ * Each part keeps its own layers' order wherever it goes. A target the style lacks puts the part
8896
+ * on top.
8897
+ *
8898
+ * @example
8899
+ * ```typescript
8900
+ * // The markers under the map's labels, the connections where they are
8901
+ * const underLabels: PlacesBeforeLayerConfig = { places: 'lowestLabel' };
8902
+ * // Everything on top of the map
8903
+ * const everything: PlacesBeforeLayerConfig = 'top';
8904
+ * ```
8905
+ *
8906
+ * @group Places
8907
+ */
8908
+ type PlacesBeforeLayerConfig = PartsBeforeLayerConfig<'places' | 'connections'>;
8643
8909
  /**
8644
8910
  * Configuration options for the PlacesModule.
8645
8911
  *
@@ -8696,8 +8962,8 @@ type PlacesModuleConfig<P extends CommonPlaceProps = CommonPlaceProps> = MapModu
8696
8962
  markerType?: PlacesMarkerType;
8697
8963
  /**
8698
8964
  * The colour of this module's own drawing: the default pin fill, the label of a hovered or
8699
- * clicked place, connection lines and entry points. Connection labels, and entry points on a
8700
- * light map, take a darker shade of it.
8965
+ * clicked place, connection lines and entry points. Connection labels take a darker shade of it
8966
+ * on a light map and a lighter one on a dark map; entry points take the darker one on a light map.
8701
8967
  *
8702
8968
  * @remarks
8703
8969
  * A more specific setting wins for its element: `icon.default.style.fillColor` for the pin,
@@ -8737,6 +9003,13 @@ type PlacesModuleConfig<P extends CommonPlaceProps = CommonPlaceProps> = MapModu
8737
9003
  * wins over `label` and `color` for the properties it names.
8738
9004
  */
8739
9005
  layers?: PlaceLayersConfig;
9006
+ /**
9007
+ * Where the module's layers sit in the map's layer stack, for everything it draws or per part.
9008
+ *
9009
+ * @remarks
9010
+ * Left out, every layer sits where {@link PlacesBeforeLayerConfig} says it does by default.
9011
+ */
9012
+ beforeLayerConfig?: PlacesBeforeLayerConfig;
8740
9013
  /**
8741
9014
  * Configuration for EV charging station availability display.
8742
9015
  *
@@ -8860,12 +9133,12 @@ type PlacesModuleSerializableConfig = Omit<PlacesModuleConfig, 'label' | 'icon'
8860
9133
  *
8861
9134
  * @remarks
8862
9135
  * Only settings that take a plain value: `label.title`, `cluster.source.clusterProperties`,
8863
- * `evAvailability.formatText` and anything holding an image, a callback or MapLibre layers are not
8864
- * knobs.
9136
+ * `evAvailability.formatText`, `connections.label` and anything holding an image, a callback or
9137
+ * MapLibre layers are not knobs.
8865
9138
  *
8866
9139
  * @group Places
8867
9140
  */
8868
- type PlacesKnobId = 'markerType' | 'color' | 'visible' | `icon.default.style.${keyof SVGIconStyleOptions}` | `label.${Exclude<keyof PlaceLabelConfig, 'title'>}` | `cluster.badge.${Exclude<keyof PlaceClusterBadgeConfig, 'radius'>}` | `cluster.badge.radius.${keyof NonNullable<PlaceClusterBadgeConfig['radius']>}` | `cluster.source.${Exclude<keyof NonNullable<PlacesClusterConfig['source']>, 'clusterProperties'>}` | `evAvailability.${Exclude<keyof EVAvailabilityConfig, 'formatText'>}` | `entryPoints.${Exclude<keyof PlaceEntryPointsConfig, 'layers'>}`;
9141
+ type PlacesKnobId = 'markerType' | 'color' | 'visible' | `icon.default.style.${keyof SVGIconStyleOptions}` | `label.${Exclude<keyof PlaceLabelConfig, 'title'>}` | `cluster.badge.${Exclude<keyof PlaceClusterBadgeConfig, 'radius'>}` | `cluster.badge.radius.${keyof NonNullable<PlaceClusterBadgeConfig['radius']>}` | `cluster.source.${Exclude<keyof NonNullable<PlacesClusterConfig['source']>, 'clusterProperties'>}` | `evAvailability.${Exclude<keyof EVAvailabilityConfig, 'formatText'>}` | `entryPoints.${Exclude<keyof PlaceEntryPointsConfig, 'layers'>}` | `connections.${Exclude<keyof PlaceConnectionsConfig, 'label' | 'layers'>}`;
8869
9142
  /**
8870
9143
  * The value type a given places knob takes: the plain value its path holds in
8871
9144
  * {@link PlacesModuleConfig}. The MapLibre expressions the config also takes there are not knob
@@ -8891,8 +9164,9 @@ type PlacesKnob = KnobEntry<PlacesKnobId, Exclude<KnobKind, 'factor' | 'colors'
8891
9164
  * @remarks
8892
9165
  * A knob is a plain display value in {@link PlacesModuleConfig}, at the path its id names.
8893
9166
  * - Not knobs: the label `title`, `clusterProperties`, `evAvailability.formatText`,
8894
- * `icon.default.image`, `icon.categoryIcons`, `icon.mapping`, `connections`, `layers`,
8895
- * `extraFeatureProps` and `events`, which take callbacks, images or MapLibre values.
9167
+ * `icon.default.image`, `icon.categoryIcons`, `icon.mapping`, `connections.label`, `layers`,
9168
+ * `beforeLayerConfig`, `extraFeatureProps` and `events`, which take callbacks, images, structured
9169
+ * or MapLibre values.
8896
9170
  * - `entryPoints` draws nothing until it is set, and `evAvailability` until `enabled` is `true`.
8897
9171
  * `cluster` applies under the `pin-clustered` marker type only.
8898
9172
  *
@@ -9182,11 +9456,11 @@ export type PlacesShownFeatures = {
9182
9456
  */
9183
9457
  export type PlacesEvents = CombinedEvents<MapGeoJSONFeature, PlacesModuleConfig, PlacesShownFeatures> & {
9184
9458
  /** The place pins themselves, clustered or not. */
9185
- places: UserEvents<Place<DisplayPlaceProps>>;
9459
+ places: UserEventsWithStates<Place<DisplayPlaceProps>>;
9186
9460
  /** The lines and labels connecting places to their parent, when connections are shown. */
9187
- connections: UserEvents<MapGeoJSONFeature>;
9461
+ connections: UserEventsWithStates<MapGeoJSONFeature>;
9188
9462
  /** The entry points of places, when {@link PlacesModuleConfig.entryPoints} draws them. */
9189
- entryPoints: UserEvents<PlaceEntryPointFeature>;
9463
+ entryPoints: UserEventsWithStates<PlaceEntryPointFeature>;
9190
9464
  };
9191
9465
  /**
9192
9466
  * Map module for displaying and managing place markers.
@@ -9321,76 +9595,35 @@ export declare class PlacesModule extends AbstractDataOwnedMapModule<PlacesSourc
9321
9595
  */
9322
9596
  protected restoreDataAndConfigImpl(): void;
9323
9597
  /**
9324
- * Changes the {@link PlacesMarkerType | kind of marker} places are drawn with.
9325
- *
9326
- * @remarks
9327
- * Redraws the places already shown, and leaves the rest of the configuration as it is.
9328
- */
9329
- applyMarkerType(markerType: PlacesMarkerType): void;
9330
- /**
9331
- * Updates the icon configuration for displayed places.
9332
- *
9333
- * @param iconConfig - New icon configuration settings.
9334
- *
9335
- * @remarks
9336
- * - Changes apply immediately to currently shown places
9337
- * - Custom icons are loaded if not already in style
9338
- * - Other configuration properties remain unchanged
9339
- *
9340
- * @example
9341
- * ```typescript
9342
- * placesModule.applyIconConfig({
9343
- * categoryIcons: [
9344
- * { id: 'RESTAURANT', image: '/icons/food.png' }
9345
- * ]
9346
- * });
9347
- * ```
9348
- */
9349
- applyIconConfig<P extends CommonPlaceProps = CommonPlaceProps>(iconConfig: PlaceIconConfig<P>): void;
9350
- /**
9351
- * Replaces the {@link PlacesModuleConfig.label | label} configuration of the displayed places.
9598
+ * Applies a configuration to this module, replacing the current one.
9352
9599
  *
9353
- * @remarks
9354
- * Supports both functions and MapLibre expressions for dynamic text.
9600
+ * @typeParam P - The place shape the `label.title`, `icon.mapping` and `extraFeatureProps`
9601
+ * callbacks expect, as with {@link PlacesModule.create}.
9355
9602
  *
9356
9603
  * @example
9357
9604
  * ```typescript
9358
- * // Use function
9359
- * placesModule.applyLabelConfig({
9360
- * title: (place) => place.properties.poi?.name || 'Unknown'
9361
- * });
9362
- *
9363
- * // Use MapLibre expression
9364
- * placesModule.applyLabelConfig({
9365
- * title: ['get', 'title'],
9366
- * size: 14,
9367
- * color: '#333'
9368
- * });
9605
+ * places.applyConfig<MyPlaceProps>({ label: { title: (place) => place.properties.storeName } });
9369
9606
  * ```
9370
9607
  */
9371
- applyLabelConfig<P extends CommonPlaceProps = CommonPlaceProps>(label: PlaceLabelConfig<P>): void;
9372
- private applyConfigPart;
9608
+ applyConfig<P extends CommonPlaceProps = CommonPlaceProps>(config: PlacesModuleConfig<P> | undefined): void;
9373
9609
  /**
9374
- * Applies additional feature properties to displayed places.
9375
- *
9376
- * @param extraFeatureProps - Object mapping property names to values or functions.
9610
+ * Changes part of the configuration and keeps the rest, redrawing the places already shown.
9377
9611
  *
9378
- * @remarks
9379
- * Useful for adding computed properties or metadata for styling/filtering.
9612
+ * @typeParam P - The place shape the `label.title`, `icon.mapping` and `extraFeatureProps`
9613
+ * callbacks expect, as with {@link PlacesModule.create}.
9380
9614
  *
9381
9615
  * @example
9382
9616
  * ```typescript
9383
- * placesModule.applyExtraFeatureProps({
9384
- * category: (place) => place.properties.poi?.localizedCategories?.[0],
9385
- * brand: (place) => place.properties.poi?.brands?.[0] ?? '',
9386
- * isOpen: true
9387
- * });
9617
+ * places.updateConfig({ markerType: 'base-map' });
9618
+ * places.updateConfig({ icon: { categoryIcons: [{ id: 'RESTAURANT', image: '/icons/food.png' }] } });
9619
+ * places.updateConfig<MyPlaceProps>({ extraFeatureProps: { brand: (place) => place.properties.brand } });
9388
9620
  * ```
9389
9621
  */
9390
- applyExtraFeatureProps<P extends CommonPlaceProps = CommonPlaceProps>(extraFeatureProps: NonNullable<PlacesModuleConfig<P>['extraFeatureProps']>): void;
9622
+ updateConfig<P extends CommonPlaceProps = CommonPlaceProps>(partial: PlacesModuleConfig<P>): void;
9391
9623
  /** @ignore */
9392
9624
  protected applyVisibility(config: PlacesModuleConfig | undefined): void;
9393
9625
  private updateLayersAndData;
9626
+ private restackLayers;
9394
9627
  private updatePlacesLayers;
9395
9628
  private rebuildSourcesAndLayers;
9396
9629
  private updateConnectionsData;
@@ -9534,55 +9767,8 @@ export declare class PlacesModule extends AbstractDataOwnedMapModule<PlacesSourc
9534
9767
  places: Places<DisplayPlaceProps>;
9535
9768
  connections: PlaceConnectionDisplay[];
9536
9769
  };
9537
- /**
9538
- * Programmatically sets an event state on a specific place.
9539
- *
9540
- * @param options - Configuration for the event state to apply.
9541
- *
9542
- * @remarks
9543
- * Use this to make places appear clicked or hovered programmatically.
9544
- *
9545
- * The state lives on the shown place: a style change, `applyConfig` and a marker type change keep
9546
- * it, while {@link show} of new results, {@link clear} and a `setStyle` with `resetState` drop
9547
- * it, whatever the ids.
9548
- *
9549
- * @example
9550
- * ```typescript
9551
- * // Make first place appear clicked
9552
- * placesModule.putEventState({
9553
- * index: 0,
9554
- * state: 'click',
9555
- * mode: 'put'
9556
- * });
9557
- * ```
9558
- */
9559
- putEventState(options: PutEventStateOptions): void;
9560
- /**
9561
- * Removes an event state from a specific place.
9562
- *
9563
- * @param options - Configuration for which event state to remove.
9564
- *
9565
- * @example
9566
- * ```typescript
9567
- * placesModule.cleanEventState({ index: 0 });
9568
- * ```
9569
- */
9570
- cleanEventState(options: CleanEventStateOptions): void;
9571
- /**
9572
- * Removes event states from multiple places.
9573
- *
9574
- * @param options - Optional filter for which states to remove.
9575
- *
9576
- * @example
9577
- * ```typescript
9578
- * // Remove all event states
9579
- * placesModule.cleanEventStates();
9580
- *
9581
- * // Remove only hover states
9582
- * placesModule.cleanEventStates({ states: ['hover'] });
9583
- * ```
9584
- */
9585
- cleanEventStates(options?: CleanEventStatesOptions): void;
9770
+ /** @ignore */
9771
+ protected eventStateSources(): (keyof PlacesSourcesAndLayers)[];
9586
9772
  get events(): PlacesEvents;
9587
9773
  }
9588
9774
  //#endregion
@@ -9700,7 +9886,7 @@ export declare const preparePlacesForDisplay: <P extends CommonPlaceProps = Comm
9700
9886
  * @example
9701
9887
  * Use with POI module filtering:
9702
9888
  * ```ts
9703
- * poisModule.filterCategories({ show: 'only', values: ['FOOD_DRINKS_GROUP', 'ENTERTAINMENT_GROUP'] });
9889
+ * poisModule.updateConfig({ filters: { categories: { show: 'only', values: ['FOOD_DRINKS_GROUP', 'ENTERTAINMENT_GROUP'] } } });
9704
9890
  * ```
9705
9891
  *
9706
9892
  * @see {@link POICategoryGroup} - Type representing all available group names
@@ -10049,7 +10235,7 @@ type PoIsSourcesAndLayers = {
10049
10235
  * Places of interest with corresponding layer ids.
10050
10236
  * TODO: technically source ID is vectorTiles if POIs stay included in base map for Orbis
10051
10237
  */
10052
- poi: StyleSourceWithLayers;
10238
+ pois: StyleSourceWithLayers;
10053
10239
  };
10054
10240
  /**
10055
10241
  * POIs Module for controlling Points of Interest displayed in the map style.
@@ -10097,31 +10283,25 @@ type PoIsSourcesAndLayers = {
10097
10283
  * Filter specific categories:
10098
10284
  * ```typescript
10099
10285
  * // Show only restaurants and hotels
10100
- * poisModule.filterCategories({
10101
- * show: 'only',
10102
- * values: ['RESTAURANT', 'HOTEL_OR_MOTEL']
10286
+ * poisModule.updateConfig({
10287
+ * filters: { categories: { show: 'only', values: ['RESTAURANT', 'HOTEL_OR_MOTEL'] } },
10103
10288
  * });
10104
10289
  *
10105
10290
  * // Hide parking garages
10106
- * poisModule.filterCategories({
10107
- * show: 'all-except',
10108
- * values: ['PARKING_GARAGE', 'OPEN_CAR_PARKING_AREA']
10291
+ * poisModule.updateConfig({
10292
+ * filters: { categories: { show: 'all-except', values: ['PARKING_GARAGE', 'OPEN_CAR_PARKING_AREA'] } },
10109
10293
  * });
10294
+ *
10295
+ * // Show every POI again
10296
+ * poisModule.updateConfig({ filters: undefined });
10110
10297
  * ```
10111
10298
  *
10112
10299
  * @example
10113
10300
  * Filter using category groups:
10114
10301
  * ```typescript
10115
10302
  * // Show only food and shopping POIs
10116
- * poisModule.filterCategories({
10117
- * show: 'only',
10118
- * values: ['FOOD_DRINKS_GROUP', 'SHOPPING_GROUP']
10119
- * });
10120
- *
10121
- * // Hide transportation POIs
10122
- * pois.filterCategories({
10123
- * show: 'all-except',
10124
- * values: ['TRANSPORTATION_GROUP']
10303
+ * poisModule.updateConfig({
10304
+ * filters: { categories: { show: 'only', values: ['FOOD_DRINKS_GROUP', 'SHOPPING_GROUP'] } },
10125
10305
  * });
10126
10306
  * ```
10127
10307
  *
@@ -10187,7 +10367,7 @@ export declare class POIsModule extends AbstractStyleOwnedMapModule<PoIsSourcesA
10187
10367
  * @ignore
10188
10368
  */
10189
10369
  protected _initSourcesWithLayers(): {
10190
- poi: StyleSourceWithLayers<import("maplibre-gl").SourceSpecification, import("maplibre-gl").Source>;
10370
+ pois: StyleSourceWithLayers<import("maplibre-gl").SourceSpecification, import("maplibre-gl").Source>;
10191
10371
  };
10192
10372
  /**
10193
10373
  * @ignore
@@ -10222,38 +10402,7 @@ export declare class POIsModule extends AbstractStyleOwnedMapModule<PoIsSourcesA
10222
10402
  */
10223
10403
  setVisible(visible: boolean): void;
10224
10404
  private _setVisible;
10225
- /**
10226
- * Filters POIs by category or category group.
10227
- *
10228
- * @param categoriesFilter - Categories (`'RESTAURANT'`) or {@link POICategoryGroup | groups}
10229
- * (`'FOOD_DRINKS_GROUP'`) to show or hide, per {@link FilterShowMode}. `undefined` shows all.
10230
- *
10231
- * @example
10232
- * Show only restaurants:
10233
- * ```typescript
10234
- * pois.filterCategories({
10235
- * show: 'only',
10236
- * values: ['RESTAURANT']
10237
- * });
10238
- * ```
10239
- *
10240
- * @example
10241
- * Hide parking:
10242
- * ```typescript
10243
- * pois.filterCategories({
10244
- * show: 'all-except',
10245
- * values: ['PARKING_GROUP']
10246
- * });
10247
- * ```
10248
- *
10249
- * @example
10250
- * Reset filter (show all):
10251
- * ```typescript
10252
- * pois.filterCategories(undefined);
10253
- * ```
10254
- */
10255
- filterCategories(categoriesFilter?: ValuesFilter<FilterablePOICategory> | undefined): void;
10256
- private _filterCategories;
10405
+ private applyCategoriesFilter;
10257
10406
  /**
10258
10407
  * Returns features currently visible in the viewport.
10259
10408
  *
@@ -10262,14 +10411,14 @@ export declare class POIsModule extends AbstractStyleOwnedMapModule<PoIsSourcesA
10262
10411
  * @example
10263
10412
  * ```typescript
10264
10413
  * const shown = poisModule.getShown();
10265
- * console.log(`Visible POIs: ${shown.poi.length}`);
10266
- * shown.poi.forEach(poi => {
10414
+ * console.log(`Visible POIs: ${shown.pois.length}`);
10415
+ * shown.pois.forEach(poi => {
10267
10416
  * console.log(poi.properties.name, poi.properties.category);
10268
10417
  * });
10269
10418
  * ```
10270
10419
  */
10271
10420
  getShown(): {
10272
- poi: POIsModuleFeature[];
10421
+ pois: POIsModuleFeature[];
10273
10422
  };
10274
10423
  /**
10275
10424
  * Gets the events interface for handling user interactions with POIs.
@@ -11032,6 +11181,14 @@ type WaypointsConfig = {
11032
11181
  */
11033
11182
  style?: SVGIconStyleOptions;
11034
11183
  };
11184
+ /**
11185
+ * How the waypoint labels look: size, font, colours and opacity.
11186
+ *
11187
+ * @remarks
11188
+ * Unset colours follow the map's light/dark theme, as the labels of places and geometries do:
11189
+ * `'#333333'` text on a `'#FFFFFF'` halo on a light map, the two swapped on a dark one.
11190
+ */
11191
+ label?: LabelConfig;
11035
11192
  /**
11036
11193
  * Controls how entry points are used when displaying waypoints on the map.
11037
11194
  *
@@ -11336,6 +11493,28 @@ type CountryCrossingConfig = {
11336
11493
  */
11337
11494
  alignment?: CountryCrossingAlignment;
11338
11495
  };
11496
+ /**
11497
+ * How a hovered or clicked route is drawn: its outline widens, in the outline colour, whether the
11498
+ * route is selected or not.
11499
+ *
11500
+ * @remarks
11501
+ * The routes draw their event states once a handler covers them, or
11502
+ * {@link RoutingModule.putEventState} puts one. A `layers.mainLines` outline `line-width` is drawn
11503
+ * as given instead.
11504
+ *
11505
+ * @group Routing
11506
+ */
11507
+ type RouteHighlightConfig = {
11508
+ /**
11509
+ * Multiplier on the outline width of a hovered or clicked route; `1` draws it as any other.
11510
+ *
11511
+ * @remarks
11512
+ * Clamped to {@link ROUTE_HIGHLIGHT_OUTLINE_WIDTH_FACTOR_RANGE}, 1 to 1.25.
11513
+ *
11514
+ * @defaultValue `1.2`
11515
+ */
11516
+ outlineWidthFactor?: number;
11517
+ };
11339
11518
  /**
11340
11519
  * Appearance of one route section type.
11341
11520
  *
@@ -11465,6 +11644,10 @@ type RoutingModuleConfig = MapModuleCommonConfig & {
11465
11644
  * @defaultValue `1`
11466
11645
  */
11467
11646
  widthFactor?: number;
11647
+ /**
11648
+ * How a hovered or clicked route is drawn.
11649
+ */
11650
+ highlight?: RouteHighlightConfig;
11468
11651
  /**
11469
11652
  * Size preset of the waypoint pins.
11470
11653
  *
@@ -11585,7 +11768,7 @@ type LeafPathOf<T> = { [KEY in keyof T & string]-?: NonNullable<T[KEY]> extends
11585
11768
  *
11586
11769
  * @group Routing
11587
11770
  */
11588
- type RoutingKnobId = 'visible' | 'color' | 'width' | 'widthFactor' | 'waypointSize' | 'waypointSizeFactor' | `waypoints.icon.style.${keyof SVGIconStyleOptions}` | 'waypoints.entryPoints' | `displayUnits.distance.${keyof DistanceDisplayUnits}` | `displayUnits.time.${keyof TimeDisplayUnits}` | 'chargingStops.visible' | 'chargingStops.label.visible' | 'summaryBubbles.visible' | `countryCrossings.${keyof CountryCrossingConfig}` | { [T in DrawnSectionType]: `sections.${T}.${LeafPathOf<SectionDisplayConfig<T>>}`; }[DrawnSectionType];
11771
+ type RoutingKnobId = 'visible' | 'color' | 'width' | 'widthFactor' | `highlight.${keyof RouteHighlightConfig}` | 'waypointSize' | 'waypointSizeFactor' | `waypoints.icon.style.${keyof SVGIconStyleOptions}` | `waypoints.label.${Extract<keyof LabelConfig, 'color' | 'haloColor'>}` | 'waypoints.entryPoints' | `displayUnits.distance.${keyof DistanceDisplayUnits}` | `displayUnits.time.${keyof TimeDisplayUnits}` | 'chargingStops.visible' | 'chargingStops.label.visible' | 'summaryBubbles.visible' | `countryCrossings.${keyof CountryCrossingConfig}` | { [T in DrawnSectionType]: `sections.${T}.${LeafPathOf<SectionDisplayConfig<T>>}`; }[DrawnSectionType];
11589
11772
  /**
11590
11773
  * The value type a given routing knob takes: the plain value its path holds in {@link RoutingModuleConfig}.
11591
11774
  *
@@ -11635,7 +11818,8 @@ type TrafficDelayColors = Record<Extract<DelayMagnitude, 'minor' | 'moderate' |
11635
11818
  * @param config - Optional routing module configuration to customize layer properties.
11636
11819
  * @param layerIDPrefix - Optional prefix to add to layer IDs for supporting multiple instances.
11637
11820
  * @param instanceIndex - Optional instance index for image ID suffixes.
11638
- * @param lightDark - The map style's light/dark theme, which the country crossing plaque colours follow.
11821
+ * @param lightDark - The map style's light/dark theme, which the waypoint labels and the country
11822
+ * crossing plaques follow.
11639
11823
  * @param existingLayerID - The anchor a configured `beforeLayerConfig` target resolves to, given the
11640
11824
  * layer it names: that layer when the style has it, else undefined for the top of the stack.
11641
11825
  * @param trafficColors - The colours traffic sections draw each delay magnitude in.
@@ -11749,6 +11933,15 @@ export declare const ROUTE_WAYPOINT_SIZE_FACTOR_RANGE: KnobRange;
11749
11933
  * @group Routing
11750
11934
  */
11751
11935
  export declare const SECTION_ICON_SIZE_FACTOR_RANGE: KnobRange;
11936
+ /**
11937
+ * The values {@link RouteHighlightConfig.outlineWidthFactor} is clamped to.
11938
+ *
11939
+ * @remarks
11940
+ * A section halo is drawn beneath the route at 1.26 times its outline width or more, at every
11941
+ * preset and zoom; a wider outline on a hovered route would cover it.
11942
+ * @group Routing
11943
+ */
11944
+ export declare const ROUTE_HIGHLIGHT_OUTLINE_WIDTH_FACTOR_RANGE: KnobRange;
11752
11945
  type IconSize = NonNullable<SymbolLayerSpecification['layout']>['icon-size'];
11753
11946
  /**
11754
11947
  * The icon size of a section layer under the given {@link SectionIconConfig.sizeFactor}: the size
@@ -12626,29 +12819,29 @@ export type RoutingShownFeatures = {
12626
12819
  *
12627
12820
  * @group Routing
12628
12821
  */
12629
- export type RoutingEvents = CombinedEvents<MapGeoJSONFeature, RoutingModuleConfig, RoutingShownFeatures> & { [K in SectionSourceKey<GeneratedSectionType>]: UserEvents<RouteSection>; } & {
12822
+ export type RoutingEvents = CombinedEvents<MapGeoJSONFeature, RoutingModuleConfig, RoutingShownFeatures> & { [K in SectionSourceKey<GeneratedSectionType>]: UserEventsWithStates<RouteSection>; } & {
12630
12823
  /** The route lines themselves. */
12631
- mainLines: UserEvents<Route<DisplayRouteProps>>;
12824
+ mainLines: UserEventsWithStates<Route<DisplayRouteProps>>;
12632
12825
  /** Origin, destination and intermediate stops. */
12633
- waypoints: UserEvents<Waypoint<WaypointDisplayProps>>;
12826
+ waypoints: UserEventsWithStates<Waypoint<WaypointDisplayProps>>;
12634
12827
  /** Charging stops along an EV route. */
12635
- chargingStops: UserEvents<RouteSection>;
12828
+ chargingStops: UserEventsWithStates<RouteSection>;
12636
12829
  /** The summary bubbles shown against each alternative. */
12637
- summaryBubbles: UserEvents<DisplayRouteSummary>;
12830
+ summaryBubbles: UserEventsWithStates<DisplayRouteSummary>;
12638
12831
  /** The border crossings along the route, each carrying the two `country` sections it joins. */
12639
- countryCrossings: UserEvents<CountryCrossingFeature>;
12832
+ countryCrossings: UserEventsWithStates<CountryCrossingFeature>;
12640
12833
  /** Traffic incidents on the route. */
12641
- incidents: UserEvents<RouteSection<DisplayTrafficSectionProps>>;
12834
+ incidents: UserEventsWithStates<RouteSection<DisplayTrafficSectionProps>>;
12642
12835
  /** Sections the vehicle is restricted from. */
12643
- vehicleRestricted: UserEvents<RouteSection>;
12836
+ vehicleRestricted: UserEventsWithStates<RouteSection>;
12644
12837
  /** Ferry sections. */
12645
- ferries: UserEvents<RouteSection>;
12838
+ ferries: UserEventsWithStates<RouteSection>;
12646
12839
  /** Toll road sections. */
12647
- tollRoads: UserEvents<RouteSection>;
12840
+ tollRoads: UserEventsWithStates<RouteSection>;
12648
12841
  /** Tunnel sections. */
12649
- tunnels: UserEvents<RouteSection>;
12842
+ tunnels: UserEventsWithStates<RouteSection>;
12650
12843
  /** The guidance instruction lines. */
12651
- instructionLines: UserEvents<DisplayInstruction>;
12844
+ instructionLines: UserEventsWithStates<DisplayInstruction>;
12652
12845
  };
12653
12846
  /**
12654
12847
  * Map module for displaying and managing route visualizations.
@@ -13027,6 +13220,8 @@ export declare class RoutingModule extends AbstractDataOwnedMapModule<RoutingSou
13027
13220
  chargingStops: DisplayChargingStops;
13028
13221
  tollRoads: RouteSections;
13029
13222
  };
13223
+ /** @ignore */
13224
+ protected eventStateSources(): (keyof RoutingSourcesWithLayers)[];
13030
13225
  /**
13031
13226
  * Unified events interface for the routing module.
13032
13227
  *
@@ -13147,7 +13342,7 @@ export declare const terrainKnobIds: readonly TerrainKnobId[];
13147
13342
  //#endregion
13148
13343
  //#region src/terrain/TerrainModule.d.ts
13149
13344
  /**
13150
- * The style source this module draws from: the raster-dem elevation source of the hillshade
13345
+ * The style source this module draws from: the raster-dem elevation source of the terrain
13151
13346
  * style part, with its hillshade layers.
13152
13347
  */
13153
13348
  type TerrainSourcesWithLayers = {
@@ -13174,7 +13369,7 @@ type TerrainSourcesWithLayers = {
13174
13369
  * @example
13175
13370
  * ```typescript
13176
13371
  * const terrain = await TerrainModule.get(map, { hillshade: true, elevation: true, elevationExaggeration: 1.3 });
13177
- * terrain.setElevationExaggeration(2);
13372
+ * terrain.updateConfig({ elevationExaggeration: 2 });
13178
13373
  * terrain.setElevationEnabled(false); // flat again, still shaded
13179
13374
  * ```
13180
13375
  *
@@ -13229,12 +13424,6 @@ export declare class TerrainModule extends AbstractStyleOwnedMapModule<TerrainSo
13229
13424
  * @returns The `elevation` setting; while nothing has set it, whether the map's own terrain raises it.
13230
13425
  */
13231
13426
  isElevationEnabled(): boolean;
13232
- /**
13233
- * Sets the vertical {@link TerrainModuleConfig.elevationExaggeration | exaggeration} of the 3D
13234
- * surface, kept for when elevation is enabled later. How strongly the slopes are shaded is the
13235
- * `hillshade.exaggeration` knob of {@link StylingModule} instead.
13236
- */
13237
- setElevationExaggeration(elevationExaggeration: number): void;
13238
13427
  /**
13239
13428
  * Lifecycle events of this module. The hillshade is a raster layer with no features to
13240
13429
  * interact with, so there are no user interaction events; `config-change` fires after every
@@ -13277,17 +13466,23 @@ type AreaAnalyticsColorStop = {
13277
13466
  */
13278
13467
  type AreaAnalyticsDisplayMode = 'heatmap' | 'hexgrid-3d' | 'hexgrid-2d' | 'square-3d' | 'square-2d';
13279
13468
  /**
13280
- * Preset color theme for area analytics visualization.
13469
+ * Every {@link AreaAnalyticsPalette} name.
13470
+ *
13471
+ * @group Traffic Area Analytics
13472
+ */
13473
+ export declare const areaAnalyticsPalettes: readonly ["trafficLight", "heat", "monochrome", "viridis", "plasma"];
13474
+ /**
13475
+ * A named colour ramp for area analytics cells, listed from good to bad traffic.
13281
13476
  *
13282
13477
  * - `'trafficLight'` — Green → amber → red (default, traffic-signal style)
13283
13478
  * - `'heat'` — Blue → orange → red (heat-map style)
13284
13479
  * - `'monochrome'` — Light grey → dark grey (print-friendly)
13285
- * - `'viridis'` — Purple → blue → green → yellow (perceptually uniform, colorblind-safe)
13286
- * - `'plasma'` — Purple → magenta → orange → yellow (vivid, perceptually uniform)
13480
+ * - `'viridis'` — Yellow → green → blue → purple (perceptually uniform, colorblind-safe)
13481
+ * - `'plasma'` — Yellow → orange → magenta → purple (vivid, perceptually uniform)
13287
13482
  *
13288
13483
  * @group Traffic Area Analytics
13289
13484
  */
13290
- type AreaAnalyticsColorTheme = 'trafficLight' | 'heat' | 'monochrome' | 'viridis' | 'plasma';
13485
+ type AreaAnalyticsPalette = (typeof areaAnalyticsPalettes)[number];
13291
13486
  /**
13292
13487
  * Determines how numeric `value` fields in color stops are interpreted.
13293
13488
  *
@@ -13311,7 +13506,7 @@ type AreaAnalyticsValueType = 'raw' | 'relativeToPredefinedRangePCT' | 'relative
13311
13506
  * @example
13312
13507
  * ```typescript
13313
13508
  * // Stops whose values are actual congestion-level values (0–100)
13314
- * const color: AreaAnalyticsColorStopsConfig = {
13509
+ * const colorStops: AreaAnalyticsColorStopsConfig = {
13315
13510
  * valueType: 'raw',
13316
13511
  * stops: [
13317
13512
  * { value: 0, color: '#2dc653' },
@@ -13321,7 +13516,7 @@ type AreaAnalyticsValueType = 'raw' | 'relativeToPredefinedRangePCT' | 'relative
13321
13516
  * };
13322
13517
  *
13323
13518
  * // Stops as 0–100 % of the predefined metric range (speed: 0–120 km/h)
13324
- * const color: AreaAnalyticsColorStopsConfig = {
13519
+ * const colorStops: AreaAnalyticsColorStopsConfig = {
13325
13520
  * valueType: 'relativeToPredefinedRangePCT',
13326
13521
  * stops: [
13327
13522
  * { value: 0, color: '#e03030' }, // 0 km/h
@@ -13331,7 +13526,7 @@ type AreaAnalyticsValueType = 'raw' | 'relativeToPredefinedRangePCT' | 'relative
13331
13526
  * };
13332
13527
  *
13333
13528
  * // Stops as 0–100 % of the live data range (maximum contrast regardless of absolute values)
13334
- * const color: AreaAnalyticsColorStopsConfig = {
13529
+ * const colorStops: AreaAnalyticsColorStopsConfig = {
13335
13530
  * valueType: 'relativeToActualRangePCT',
13336
13531
  * stops: [
13337
13532
  * { value: 0, color: '#2dc653' }, // 0% = loaded minimum
@@ -13370,7 +13565,7 @@ type AreaAnalyticsMetricFilter = {
13370
13565
  *
13371
13566
  * The shape depends on `scaleMode`:
13372
13567
  * - `'predefinedRange'` / `'currentRange'` (default): use `maxHeightMeters` to set a true visual ceiling.
13373
- * - `'raw'`: use `scaleFactor` to multiply the raw metric value directly.
13568
+ * - `'raw'`: use `metersPerUnit` to turn the raw metric value into metres of height.
13374
13569
  *
13375
13570
  * @group Traffic Area Analytics
13376
13571
  */
@@ -13396,14 +13591,14 @@ type AreaAnalyticsHeightConfig = {
13396
13591
  */
13397
13592
  minHeightMeters?: number;
13398
13593
  } | {
13399
- /** Raw scale mode: `scaleFactor` is multiplied directly with the raw metric value. */
13594
+ /** Raw scale mode: the height is the raw metric value times `metersPerUnit`. */
13400
13595
  scaleMode: 'raw';
13401
13596
  /**
13402
- * Multiplier applied to the raw metric value to obtain extrusion height in meters.
13597
+ * Metres of extrusion height per unit of the metric.
13403
13598
  *
13404
13599
  * @defaultValue 1
13405
13600
  */
13406
- scaleFactor?: number;
13601
+ metersPerUnit?: number;
13407
13602
  /**
13408
13603
  * Minimum extrusion height in meters.
13409
13604
  *
@@ -13418,16 +13613,20 @@ type AreaAnalyticsHeightConfig = {
13418
13613
  */
13419
13614
  type AreaAnalyticsMetricConfig = {
13420
13615
  /**
13421
- * Color for this metric's visualization.
13616
+ * Palette the cells of this metric are coloured with, spread evenly over the metric's range.
13422
13617
  *
13423
- * Pass a preset theme name (`AreaAnalyticsColorTheme`) or a custom
13424
- * `AreaAnalyticsColorStopsConfig` object with explicit stop values and a
13425
- * value-type hint. For `speed`, the color order is automatically inverted
13426
- * so that slow speeds render as "bad" (red) and fast speeds as "good" (green).
13618
+ * @remarks
13619
+ * On `speed` and `freeFlowSpeed`, where higher is better, the palette runs the other way, so slow
13620
+ * traffic takes its bad end. On `networkLength` it spans the loaded data's range, on the other
13621
+ * metrics their predefined range. `colorStops` wins over it.
13427
13622
  *
13428
- * @defaultValue `'trafficLight'` theme
13623
+ * @defaultValue 'trafficLight'
13624
+ */
13625
+ palette?: AreaAnalyticsPalette;
13626
+ /**
13627
+ * Explicit colour stops for this metric's cells, used as given. Wins over `palette`.
13429
13628
  */
13430
- color?: AreaAnalyticsColorTheme | AreaAnalyticsColorStopsConfig;
13629
+ colorStops?: AreaAnalyticsColorStopsConfig;
13431
13630
  /**
13432
13631
  * Extrusion height configuration for this metric.
13433
13632
  */
@@ -13509,17 +13708,6 @@ type AreaAnalyticsRegionPolygonConfig = {
13509
13708
  */
13510
13709
  inverted?: boolean;
13511
13710
  };
13512
- /**
13513
- * The green / amber / red every metric's default colour stops and the `trafficLight` colour theme
13514
- * are drawn from.
13515
- *
13516
- * @ignore
13517
- */
13518
- declare const TRAFFIC_LIGHT_COLORS: {
13519
- readonly good: "#2dc653";
13520
- readonly moderate: "#f5a623";
13521
- readonly bad: "#e03030";
13522
- };
13523
13711
  /**
13524
13712
  * Default values for all {@link TrafficAreaAnalyticsModuleConfig} options.
13525
13713
  *
@@ -13538,19 +13726,7 @@ declare const AREA_ANALYTICS_DEFAULTS: {
13538
13726
  /** @see {@link TrafficAreaAnalyticsModuleConfig.metricConfig} */
13539
13727
  metricConfig: {
13540
13728
  congestionLevel: {
13541
- color: {
13542
- valueType: "raw";
13543
- stops: ({
13544
- value: number;
13545
- color: "#2dc653";
13546
- } | {
13547
- value: number;
13548
- color: "#f5a623";
13549
- } | {
13550
- value: number;
13551
- color: "#e03030";
13552
- })[];
13553
- };
13729
+ palette: "trafficLight";
13554
13730
  height: {
13555
13731
  maxHeightMeters: number;
13556
13732
  minHeightMeters: number;
@@ -13558,19 +13734,7 @@ declare const AREA_ANALYTICS_DEFAULTS: {
13558
13734
  };
13559
13735
  };
13560
13736
  speed: {
13561
- color: {
13562
- valueType: "relativeToPredefinedRangePCT";
13563
- stops: ({
13564
- value: number;
13565
- color: "#e03030";
13566
- } | {
13567
- value: number;
13568
- color: "#f5a623";
13569
- } | {
13570
- value: number;
13571
- color: "#2dc653";
13572
- })[];
13573
- };
13737
+ palette: "trafficLight";
13574
13738
  height: {
13575
13739
  maxHeightMeters: number;
13576
13740
  minHeightMeters: number;
@@ -13578,19 +13742,7 @@ declare const AREA_ANALYTICS_DEFAULTS: {
13578
13742
  };
13579
13743
  };
13580
13744
  travelTime: {
13581
- color: {
13582
- valueType: "relativeToPredefinedRangePCT";
13583
- stops: ({
13584
- value: number;
13585
- color: "#2dc653";
13586
- } | {
13587
- value: number;
13588
- color: "#f5a623";
13589
- } | {
13590
- value: number;
13591
- color: "#e03030";
13592
- })[];
13593
- };
13745
+ palette: "trafficLight";
13594
13746
  height: {
13595
13747
  maxHeightMeters: number;
13596
13748
  minHeightMeters: number;
@@ -13598,19 +13750,7 @@ declare const AREA_ANALYTICS_DEFAULTS: {
13598
13750
  };
13599
13751
  };
13600
13752
  freeFlowSpeed: {
13601
- color: {
13602
- valueType: "relativeToPredefinedRangePCT";
13603
- stops: ({
13604
- value: number;
13605
- color: "#e03030";
13606
- } | {
13607
- value: number;
13608
- color: "#f5a623";
13609
- } | {
13610
- value: number;
13611
- color: "#2dc653";
13612
- })[];
13613
- };
13753
+ palette: "trafficLight";
13614
13754
  height: {
13615
13755
  maxHeightMeters: number;
13616
13756
  minHeightMeters: number;
@@ -13618,19 +13758,7 @@ declare const AREA_ANALYTICS_DEFAULTS: {
13618
13758
  };
13619
13759
  };
13620
13760
  networkLength: {
13621
- color: {
13622
- valueType: "relativeToActualRangePCT";
13623
- stops: ({
13624
- value: number;
13625
- color: "#2dc653";
13626
- } | {
13627
- value: number;
13628
- color: "#f5a623";
13629
- } | {
13630
- value: number;
13631
- color: "#e03030";
13632
- })[];
13633
- };
13761
+ palette: "trafficLight";
13634
13762
  height: {
13635
13763
  maxHeightMeters: number;
13636
13764
  minHeightMeters: number;
@@ -13654,9 +13782,9 @@ declare const AREA_ANALYTICS_DEFAULTS: {
13654
13782
  *
13655
13783
  * @remarks
13656
13784
  * The active metric is set via `activeMetric` (defaults to `'congestionLevel'`).
13657
- * Per-metric style settings (color, height, filters) are nested under `metricConfig` keyed by
13785
+ * Per-metric style settings (palette or colour stops, height, filters) are nested under `metricConfig` keyed by
13658
13786
  * `AreaAnalyticsMetricKey`, making it easy to pre-configure multiple metrics independently and switch
13659
- * between them at runtime via `setMetric()`.
13787
+ * between them at runtime with `updateConfig({ activeMetric })`.
13660
13788
  *
13661
13789
  * @example
13662
13790
  * ```typescript
@@ -13665,12 +13793,12 @@ declare const AREA_ANALYTICS_DEFAULTS: {
13665
13793
  * activeMetric: 'congestionLevel',
13666
13794
  * metricConfig: {
13667
13795
  * congestionLevel: {
13668
- * color: 'heat',
13796
+ * palette: 'heat',
13669
13797
  * height: { maxHeightMeters: 80, scaleMode: 'predefinedRange' },
13670
13798
  * filters: { min: 10 },
13671
13799
  * },
13672
13800
  * speed: {
13673
- * color: {
13801
+ * colorStops: {
13674
13802
  * valueType: 'raw',
13675
13803
  * stops: [
13676
13804
  * { value: 0, color: '#e03030' },
@@ -13705,11 +13833,11 @@ type TrafficAreaAnalyticsModuleConfig = MapModuleCommonConfig & {
13705
13833
  */
13706
13834
  activeMetric?: AreaAnalyticsMetricKey;
13707
13835
  /**
13708
- * Per-metric visualization configuration (color, height, filters).
13836
+ * Per-metric visualization configuration (palette or colour stops, height, filters).
13709
13837
  *
13710
- * Metrics not listed here fall back to defaults (congestion color theme, metric-dependent height scale).
13838
+ * Metrics not listed here fall back to defaults (the `trafficLight` palette, metric-dependent height scale).
13711
13839
  * `updateConfig` replaces this whole record, so to change one metric and keep the others' settings,
13712
- * use `setColor`, `setHeight` or `filter` with that metric.
13840
+ * use `setPalette`, `setColorStops`, `setHeight` or `filter` with that metric.
13713
13841
  */
13714
13842
  metricConfig?: Partial<Record<AreaAnalyticsMetricKey, AreaAnalyticsMetricConfig>>;
13715
13843
  /**
@@ -13930,7 +14058,7 @@ export type TrafficFlowModuleConfig = MapModuleCommonConfig & {
13930
14058
  filters?: TrafficFlowFilters;
13931
14059
  };
13932
14060
  //#endregion
13933
- //#region src/traffic/types/trafficIncidentOverlayConfig.d.ts
14061
+ //#region src/traffic/types/trafficIncidentDetailsConfig.d.ts
13934
14062
  /**
13935
14063
  * The values {@link IncidentFocusStyle.widthFactor} is clamped to.
13936
14064
  *
@@ -13942,7 +14070,7 @@ export type TrafficFlowModuleConfig = MapModuleCommonConfig & {
13942
14070
  export declare const INCIDENT_FOCUS_WIDTH_FACTOR_RANGE: KnobRange;
13943
14071
  /**
13944
14072
  * Visual treatment applied to the focused subset by
13945
- * {@link TrafficIncidentOverlayModule.setFocus}.
14073
+ * {@link TrafficIncidentDetailsModule.setFocus}, and to a hovered or clicked incident.
13946
14074
  *
13947
14075
  * @group Traffic
13948
14076
  */
@@ -13963,11 +14091,11 @@ export type IncidentFocusStyle = {
13963
14091
  widthFactor?: number;
13964
14092
  };
13965
14093
  /**
13966
- * Configuration for {@link TrafficIncidentOverlayModule}.
14094
+ * Configuration for {@link TrafficIncidentDetailsModule}.
13967
14095
  *
13968
14096
  * @group Traffic
13969
14097
  */
13970
- export type TrafficIncidentOverlayModuleConfig = MapModuleCommonConfig & {
14098
+ export type TrafficIncidentDetailsModuleConfig = MapModuleCommonConfig & {
13971
14099
  /**
13972
14100
  * Whether the incident layers are shown. Defaults to `true`.
13973
14101
  * `show()` never flips this flag — if `false`, the module loads data but
@@ -13983,13 +14111,14 @@ export type TrafficIncidentOverlayModuleConfig = MapModuleCommonConfig & {
13983
14111
  */
13984
14112
  beforeLayerConfig?: BeforeLayerConfig;
13985
14113
  /**
13986
- * Visual treatment for {@link TrafficIncidentOverlayModule.setFocus}.
14114
+ * Visual treatment for {@link TrafficIncidentDetailsModule.setFocus}, which a hovered or
14115
+ * clicked incident draws too.
13987
14116
  *
13988
14117
  * - Omit (or `undefined`) — use the SDK default treatment: an outline beneath
13989
14118
  * the focused stripe (black on light map styles, white on dark) and a `1.6×` width pop.
13990
14119
  * - `false` — disable the visual treatment. `setFocus(ids)` still writes
13991
- * MapLibre `feature-state.focused`, so callers can drive their own
13992
- * styling (extra layers, sidebar overlays, …) off that state.
14120
+ * MapLibre `feature-state.focused`, and user events `eventState`, so callers can drive
14121
+ * their own styling (extra layers, sidebar overlays, …) off those states.
13993
14122
  * - `{ outlineColor?, widthFactor? }` — override individual fields of the
13994
14123
  * default treatment.
13995
14124
  */
@@ -14219,35 +14348,35 @@ type TrafficIncidentsKnobValueOf<ID extends TrafficIncidentsKnobId> = KnobPlainV
14219
14348
  */
14220
14349
  type TrafficIncidentsKnob = KnobEntry<TrafficIncidentsKnobId, TrafficKnobKind>;
14221
14350
  /**
14222
- * The id of an incident overlay knob: its path into {@link TrafficIncidentOverlayModuleConfig}.
14223
- * See {@link trafficIncidentOverlayKnobCatalogue} for what each one does.
14351
+ * The id of an incident details knob: its path into {@link TrafficIncidentDetailsModuleConfig}.
14352
+ * See {@link trafficIncidentDetailsKnobCatalogue} for what each one does.
14224
14353
  *
14225
14354
  * @group Traffic
14226
14355
  */
14227
- type TrafficIncidentOverlayKnobId = 'visible' | `focus.${keyof IncidentFocusStyle}`;
14356
+ type TrafficIncidentDetailsKnobId = 'visible' | `focus.${keyof IncidentFocusStyle}`;
14228
14357
  /**
14229
- * The value type a given incident overlay knob takes: the plain value its path holds in
14230
- * {@link TrafficIncidentOverlayModuleConfig}.
14358
+ * The value type a given incident details knob takes: the plain value its path holds in
14359
+ * {@link TrafficIncidentDetailsModuleConfig}.
14231
14360
  *
14232
14361
  * @group Traffic
14233
14362
  */
14234
- type TrafficIncidentOverlayKnobValueOf<ID extends TrafficIncidentOverlayKnobId> = KnobPlainValue<ValueAt<TrafficIncidentOverlayModuleConfig, ID>>;
14363
+ type TrafficIncidentDetailsKnobValueOf<ID extends TrafficIncidentDetailsKnobId> = KnobPlainValue<ValueAt<TrafficIncidentDetailsModuleConfig, ID>>;
14235
14364
  /**
14236
- * One entry of {@link trafficIncidentOverlayKnobCatalogue}. The value in force is the one at its
14237
- * path in {@link TrafficIncidentOverlayModule.getConfig}, else its `default`; with neither, the
14365
+ * One entry of {@link trafficIncidentDetailsKnobCatalogue}. The value in force is the one at its
14366
+ * path in {@link TrafficIncidentDetailsModule.getConfig}, else its `default`; with neither, the
14238
14367
  * map's light/dark theme decides.
14239
14368
  *
14240
14369
  * @group Traffic
14241
14370
  */
14242
- type TrafficIncidentOverlayKnob = KnobEntry<TrafficIncidentOverlayKnobId, TrafficKnobKind>;
14371
+ type TrafficIncidentDetailsKnob = KnobEntry<TrafficIncidentDetailsKnobId, TrafficKnobKind>;
14243
14372
  /**
14244
14373
  * An area analytics knob's path below `metricConfig.<metric>.`, whichever metric takes it.
14245
14374
  * @ignore
14246
14375
  */
14247
- type AreaAnalyticsMetricKnobLeaf = 'color' | `height.${KeyOfEither<AreaAnalyticsHeightConfig>}` | `filters.${keyof AreaAnalyticsMetricFilter}`;
14376
+ type AreaAnalyticsMetricKnobLeaf = 'palette' | `height.${KeyOfEither<AreaAnalyticsHeightConfig>}` | `filters.${keyof AreaAnalyticsMetricFilter}`;
14248
14377
  /**
14249
14378
  * The id of an area analytics knob: its path into {@link TrafficAreaAnalyticsModuleConfig}, e.g.
14250
- * `displayMode` or `metricConfig.speed.color`. See {@link trafficAreaAnalyticsKnobCatalogue} for
14379
+ * `displayMode` or `metricConfig.speed.palette`. See {@link trafficAreaAnalyticsKnobCatalogue} for
14251
14380
  * what each one does.
14252
14381
  *
14253
14382
  * @remarks
@@ -14260,10 +14389,6 @@ type TrafficAreaAnalyticsKnobId = 'visible' | 'displayMode' | 'activeMetric' | `
14260
14389
  * The value type a given area analytics knob takes: the plain value its path holds in
14261
14390
  * {@link TrafficAreaAnalyticsModuleConfig}.
14262
14391
  *
14263
- * @remarks
14264
- * `metricConfig.<metric>.color` is a theme name: the custom colour stops the config also takes there
14265
- * are not a knob value.
14266
- *
14267
14392
  * @group Traffic Area Analytics
14268
14393
  */
14269
14394
  type TrafficAreaAnalyticsKnobValueOf<ID extends TrafficAreaAnalyticsKnobId> = KnobPlainValue<ValueAt<TrafficAreaAnalyticsModuleConfig, ID>>;
@@ -14316,7 +14441,7 @@ export declare const trafficIncidentsKnobCatalogue: readonly TrafficIncidentsKno
14316
14441
  */
14317
14442
  export declare const trafficIncidentsKnobIds: readonly TrafficIncidentsKnobId[];
14318
14443
  /**
14319
- * Every {@link TrafficIncidentOverlayModule} knob with its kind, description, range and, where one
14444
+ * Every {@link TrafficIncidentDetailsModule} knob with its kind, description, range and, where one
14320
14445
  * value holds everywhere, its default. Static data, readable with no map loaded.
14321
14446
  *
14322
14447
  * @remarks
@@ -14326,20 +14451,20 @@ export declare const trafficIncidentsKnobIds: readonly TrafficIncidentsKnobId[];
14326
14451
  *
14327
14452
  * @group Traffic
14328
14453
  */
14329
- export declare const trafficIncidentOverlayKnobCatalogue: readonly TrafficIncidentOverlayKnob[];
14454
+ export declare const trafficIncidentDetailsKnobCatalogue: readonly TrafficIncidentDetailsKnob[];
14330
14455
  /**
14331
- * Every incident overlay knob id, in catalogue order.
14456
+ * Every incident details knob id, in catalogue order.
14332
14457
  *
14333
14458
  * @group Traffic
14334
14459
  */
14335
- export declare const trafficIncidentOverlayKnobIds: readonly TrafficIncidentOverlayKnobId[];
14460
+ export declare const trafficIncidentDetailsKnobIds: readonly TrafficIncidentDetailsKnobId[];
14336
14461
  /**
14337
14462
  * Every {@link TrafficAreaAnalyticsModule} knob with its kind, description, range or options and,
14338
14463
  * where one value holds everywhere, its default: the module-wide knobs first, then each metric's.
14339
14464
  * Static data, readable with no map loaded.
14340
14465
  *
14341
14466
  * @remarks
14342
- * Not knobs: custom colour stops, `beforeLayerConfig` and `events`, which take structured values.
14467
+ * Not knobs: `colorStops`, `beforeLayerConfig` and `events`, which take structured values.
14343
14468
  * The module bounds no height: a height knob's range is the span a UI offers.
14344
14469
  *
14345
14470
  * @group Traffic Area Analytics
@@ -14354,10 +14479,12 @@ export declare const trafficAreaAnalyticsKnobIds: readonly TrafficAreaAnalyticsK
14354
14479
  //#endregion
14355
14480
  //#region src/traffic/layers/areaAnalyticsLayers.d.ts
14356
14481
  /**
14357
- * Resolves the effective color stops for a given color configuration.
14482
+ * The colour stops a metric's cells are painted with: its `colorStops` when set, else its `palette`
14483
+ * (`trafficLight` when unset) spread evenly from 0 to 100 % of the metric's range, as
14484
+ * {@link AreaAnalyticsMetricConfig.palette} describes.
14358
14485
  * @ignore
14359
14486
  */
14360
- export declare const resolveColorStops: (colorConfig: AreaAnalyticsColorTheme | AreaAnalyticsColorStopsConfig) => AreaAnalyticsColorStop[];
14487
+ export declare const resolveColorStops: (metric: AreaAnalyticsMetricKey, metricConfig?: Pick<AreaAnalyticsMetricConfig, "palette" | "colorStops">) => AreaAnalyticsColorStopsConfig;
14361
14488
  //#endregion
14362
14489
  //#region src/traffic/types/trafficAreaAnalyticsFeature.d.ts
14363
14490
  /**
@@ -14466,7 +14593,7 @@ export declare class TrafficAreaAnalyticsModule extends AbstractDataOwnedMapModu
14466
14593
  * const module = await TrafficAreaAnalyticsModule.create(map, {
14467
14594
  * displayMode: 'heatmap',
14468
14595
  * metricConfig: {
14469
- * congestionLevel: { color: 'heat' },
14596
+ * congestionLevel: { palette: 'heat' },
14470
14597
  * },
14471
14598
  * });
14472
14599
  * ```
@@ -14477,7 +14604,6 @@ export declare class TrafficAreaAnalyticsModule extends AbstractDataOwnedMapModu
14477
14604
  protected _initSourcesWithLayers(config?: TrafficAreaAnalyticsModuleConfig, _restore?: boolean): AreaAnalyticsSourcesWithLayers;
14478
14605
  /** @ignore */
14479
14606
  protected _applyConfig(config: TrafficAreaAnalyticsModuleConfig | undefined): TrafficAreaAnalyticsModuleConfig | undefined;
14480
- private get modeLayerSpecs();
14481
14607
  private moveLayersToSpecPositions;
14482
14608
  /** @ignore */
14483
14609
  protected discardShownData(): void;
@@ -14500,56 +14626,44 @@ export declare class TrafficAreaAnalyticsModule extends AbstractDataOwnedMapModu
14500
14626
  * ```
14501
14627
  */
14502
14628
  show(analytics: TrafficAreaAnalytics): Promise<void>;
14629
+ private display;
14503
14630
  /**
14504
14631
  * Removes all area analytics data from the map.
14505
14632
  */
14506
14633
  clear(): Promise<void>;
14507
14634
  /**
14508
- * Switches the visualisation mode.
14635
+ * Sets the palette of one or more metrics, as {@link AreaAnalyticsMetricConfig.palette} describes.
14509
14636
  *
14510
- * @param mode - One of `'heatmap'`, `'hexgrid-3d'`, `'hexgrid-2d'`, `'square-3d'`, `'square-2d'`.
14511
- */
14512
- setMode(mode: AreaAnalyticsDisplayMode): void;
14513
- /**
14514
- * Changes the active metric that drives colour and height.
14637
+ * A metric whose `colorStops` are set keeps painting with them; clear those with
14638
+ * `setColorStops(undefined)` for the palette to show.
14515
14639
  *
14516
- * Updates `activeMetric` in the config to the given metric key.
14640
+ * @param palette - The palette, or `undefined` to clear it back to `trafficLight`.
14641
+ * @param metrics - The metrics to set it on. When omitted, **all** metrics.
14517
14642
  *
14518
- * @param metric - One of `'congestionLevel'`, `'speed'`, `'travelTime'`, `'freeFlowSpeed'`, or `'networkLength'`.
14643
+ * @example
14644
+ * ```typescript
14645
+ * module.setPalette('heat'); // every metric
14646
+ * module.setPalette('viridis', ['speed', 'freeFlowSpeed']);
14647
+ * module.setPalette(undefined, ['speed']); // back to 'trafficLight'
14648
+ * ```
14519
14649
  */
14520
- setMetric(metric: AreaAnalyticsMetricKey): void;
14650
+ setPalette(palette: AreaAnalyticsPalette | undefined, metrics?: AreaAnalyticsMetricKey[]): void;
14521
14651
  /**
14522
- * Sets the color for one or more metrics.
14652
+ * Sets explicit colour stops on one or more metrics, which win over their palette.
14523
14653
  *
14524
- * Pass a preset theme name or a custom color-stops configuration.
14525
- * Pass `undefined` to clear the color override for the targeted metrics.
14526
- *
14527
- * @param color - A preset theme, an `AreaAnalyticsColorStopsConfig`, or `undefined` to clear.
14528
- * @param metrics - Optional list of metrics to target.
14529
- * When omitted, the color is applied to **all** metrics.
14654
+ * @param colorStops - The stops, or `undefined` to clear them so the palette paints again.
14655
+ * @param metrics - The metrics to set them on. When omitted, **all** metrics.
14530
14656
  *
14531
14657
  * @example
14532
14658
  * ```typescript
14533
- * // Apply a theme to all metrics
14534
- * module.setColor('heat');
14535
- *
14536
- * // Apply a theme to specific metrics only
14537
- * module.setColor('heat', ['speed', 'freeFlowSpeed']);
14538
- *
14539
- * // Apply custom stops to a single metric
14540
- * module.setColor(
14659
+ * module.setColorStops(
14541
14660
  * { valueType: 'raw', stops: [{ value: 0, color: '#2dc653' }, { value: 100, color: '#e03030' }] },
14542
14661
  * ['congestionLevel'],
14543
14662
  * );
14544
- *
14545
- * // Clear color override for all metrics
14546
- * module.setColor(undefined);
14547
- *
14548
- * // Clear color override for a specific metric
14549
- * module.setColor(undefined, ['speed']);
14663
+ * module.setColorStops(undefined); // every metric back to its palette
14550
14664
  * ```
14551
14665
  */
14552
- setColor(color: AreaAnalyticsColorTheme | AreaAnalyticsColorStopsConfig | undefined, metrics?: AreaAnalyticsMetricKey[]): void;
14666
+ setColorStops(colorStops: AreaAnalyticsColorStopsConfig | undefined, metrics?: AreaAnalyticsMetricKey[]): void;
14553
14667
  /**
14554
14668
  * Configures extrusion height behaviour for one or more metrics.
14555
14669
  *
@@ -14577,22 +14691,16 @@ export declare class TrafficAreaAnalyticsModule extends AbstractDataOwnedMapModu
14577
14691
  * @example
14578
14692
  * ```typescript
14579
14693
  * // Filter all metrics
14580
- * module.filter({ min: 20, max: 80 });
14694
+ * module.setFilters({ min: 20, max: 80 });
14581
14695
  *
14582
14696
  * // Filter only a specific metric
14583
- * module.filter({ min: 50 }, ['congestionLevel']);
14697
+ * module.setFilters({ min: 50 }, ['congestionLevel']);
14584
14698
  *
14585
- * // Clear filter for all metrics
14586
- * module.filter(undefined);
14699
+ * // Clear the filters of every metric
14700
+ * module.setFilters(undefined);
14587
14701
  * ```
14588
14702
  */
14589
- filter(filter?: AreaAnalyticsMetricFilter, metrics?: AreaAnalyticsMetricKey[]): void;
14590
- /**
14591
- * Clears any active tile filter for one or more metrics.
14592
- *
14593
- * @param metrics - Optional list of metrics to clear. When omitted, clears filters for **all** metrics.
14594
- */
14595
- clearFilter(metrics?: AreaAnalyticsMetricKey[]): void;
14703
+ setFilters(filters: AreaAnalyticsMetricFilter | undefined, metrics?: AreaAnalyticsMetricKey[]): void;
14596
14704
  /**
14597
14705
  * Returns the currently displayed data for all visualisation modes.
14598
14706
  */
@@ -14601,14 +14709,8 @@ export declare class TrafficAreaAnalyticsModule extends AbstractDataOwnedMapModu
14601
14709
  hexgrid: FeatureCollection<Polygon, AreaAnalyticsDisplayProperties>;
14602
14710
  square: FeatureCollection<Polygon, AreaAnalyticsDisplayProperties>;
14603
14711
  };
14604
- /**
14605
- * Repositions the analytics layers, all together or per display mode.
14606
- *
14607
- * Only the display modes `layerConfig` names a target for are repositioned; the others are left in place.
14608
- *
14609
- * @param layerConfig - A single target for every mode, or one per {@link AreaAnalyticsDisplayMode}.
14610
- */
14611
- moveBeforeLayer(layerConfig: AreaAnalyticsBeforeLayerConfig): void;
14712
+ /** @ignore */
14713
+ protected eventStateSources(): (keyof AreaAnalyticsSourcesWithLayers)[];
14612
14714
  /**
14613
14715
  * Event interface for the hexgrid and square layers.
14614
14716
  *
@@ -14632,7 +14734,7 @@ export declare class TrafficAreaAnalyticsModule extends AbstractDataOwnedMapModu
14632
14734
  * ```
14633
14735
  */
14634
14736
  get events(): CombinedEvents<AreaAnalyticsTileFeature, TrafficAreaAnalyticsModuleConfig, TrafficAreaAnalytics>;
14635
- private get mode();
14737
+ private setMetricField;
14636
14738
  private get activeMetric();
14637
14739
  private get lightDark();
14638
14740
  /** @ignore */
@@ -14748,34 +14850,20 @@ type TrafficFlowSourcesWithLayers = {
14748
14850
  * Filter by road type:
14749
14851
  * ```typescript
14750
14852
  * // Show only highway traffic
14751
- * trafficFlow.filter({
14752
- * any: [{
14753
- * roadCategories: {
14754
- * show: 'only',
14755
- * values: ['motorway', 'trunk']
14756
- * }
14757
- * }]
14853
+ * trafficFlow.updateConfig({
14854
+ * filters: { any: [{ roadCategories: { show: 'only', values: ['motorway', 'trunk'] } }] },
14758
14855
  * });
14759
14856
  *
14760
14857
  * // Hide local streets
14761
- * trafficFlow.filter({
14762
- * any: [{
14763
- * roadCategories: {
14764
- * show: 'all-except',
14765
- * values: ['street']
14766
- * }
14767
- * }]
14858
+ * trafficFlow.updateConfig({
14859
+ * filters: { any: [{ roadCategories: { show: 'all-except', values: ['street'] } }] },
14768
14860
  * });
14769
- * ```
14770
14861
  *
14771
- * @example
14772
- * Show only road closures:
14773
- * ```typescript
14774
- * trafficFlow.filter({
14775
- * any: [{
14776
- * showRoadClosures: 'only'
14777
- * }]
14778
- * });
14862
+ * // Show only road closures
14863
+ * trafficFlow.updateConfig({ filters: { any: [{ showRoadClosures: 'only' }] } });
14864
+ *
14865
+ * // Show all traffic again
14866
+ * trafficFlow.updateConfig({ filters: undefined });
14779
14867
  * ```
14780
14868
  *
14781
14869
  * @see [Traffic Flow Guide](https://docs.tomtom.com/maps-sdk-js/guides/map/traffic-flow)
@@ -14846,78 +14934,7 @@ export declare class TrafficFlowModule extends AbstractStyleOwnedMapModule<Traff
14846
14934
  */
14847
14935
  protected _applyConfig(config: TrafficFlowModuleConfig | undefined): TrafficFlowModuleConfig | undefined;
14848
14936
  private getLayers;
14849
- /**
14850
- * Applies filters to traffic flow display.
14851
- *
14852
- * @param filters - Filter configuration for road types, categories, and closures.
14853
- * Pass `undefined` to reset to defaults (show all).
14854
- *
14855
- * @remarks
14856
- * **Filter Options:**
14857
- * - `roadCategories`: Filter by road importance (motorway, trunk, primary, etc.)
14858
- * - `roadSubCategories`: Filter by specific street types
14859
- * - `showRoadClosures`: Show only closures or exclude them
14860
- *
14861
- * **Available Road Categories:**
14862
- * - `motorway`: Major highways
14863
- * - `trunk`: Major roads
14864
- * - `primary`: Primary roads
14865
- * - `secondary`: Secondary roads
14866
- * - `tertiary`: Tertiary roads
14867
- * - `street`: Local streets
14868
- *
14869
- * **Filter Logic:**
14870
- * Uses "any" (OR) logic - traffic matching any filter is shown.
14871
- *
14872
- * @example
14873
- * Show only major roads:
14874
- * ```typescript
14875
- * trafficFlow.filter({
14876
- * any: [{
14877
- * roadCategories: {
14878
- * show: 'only',
14879
- * values: ['motorway', 'trunk', 'primary']
14880
- * }
14881
- * }]
14882
- * });
14883
- * ```
14884
- *
14885
- * @example
14886
- * Hide street-level traffic:
14887
- * ```typescript
14888
- * trafficFlow.filter({
14889
- * any: [{
14890
- * roadCategories: {
14891
- * show: 'all-except',
14892
- * values: ['street']
14893
- * }
14894
- * }]
14895
- * });
14896
- * ```
14897
- *
14898
- * @example
14899
- * Multiple filter criteria:
14900
- * ```typescript
14901
- * trafficFlow.filter({
14902
- * any: [
14903
- * {
14904
- * roadCategories: { show: 'only', values: ['motorway'] }
14905
- * },
14906
- * {
14907
- * showRoadClosures: 'only'
14908
- * }
14909
- * ]
14910
- * });
14911
- * ```
14912
- *
14913
- * @example
14914
- * Reset filters:
14915
- * ```typescript
14916
- * trafficFlow.filter(undefined);
14917
- * ```
14918
- */
14919
- filter(filters?: TrafficFlowFilters): void;
14920
- private _filter;
14937
+ private applyFilters;
14921
14938
  /**
14922
14939
  * Sets the visibility of traffic flow layers.
14923
14940
  *
@@ -14972,7 +14989,7 @@ export declare class TrafficFlowModule extends AbstractStyleOwnedMapModule<Traff
14972
14989
  get events(): CombinedEvents<TrafficFlowModuleFeature, TrafficFlowModuleConfig, never>;
14973
14990
  }
14974
14991
  //#endregion
14975
- //#region src/traffic/TrafficIncidentOverlayModule.d.ts
14992
+ //#region src/traffic/TrafficIncidentDetailsModule.d.ts
14976
14993
  type Sources = {
14977
14994
  incidents: GeoJSONSourceWithLayers<TrafficIncidentDetails>;
14978
14995
  };
@@ -14981,9 +14998,9 @@ type Sources = {
14981
14998
  *
14982
14999
  * Use this module when you fetch incidents via the Incident Details service and want
14983
15000
  * to display them as a developer-controlled overlay. {@link TrafficIncidentsModule} is
14984
- * the vector-tile alternative — hidden in the default style, so the overlay renders
15001
+ * the vector-tile alternative — hidden in the default style, so this module renders
14985
15002
  * on its own without collision; if you've enabled it elsewhere in your app, hide it
14986
- * again before using the overlay to avoid double-rendering.
15003
+ * again before using this module to avoid double-rendering.
14987
15004
  *
14988
15005
  * ## Rendering approach
14989
15006
  *
@@ -15003,10 +15020,11 @@ type Sources = {
15003
15020
  * {@link setFocus} writes MapLibre feature-state `focused=true|false` on each rendered
15004
15021
  * incident. The default visual treatment widens the focused subset and paints an
15005
15022
  * outline beneath it (black on light map styles, white on dark); unfocused incidents
15006
- * are unchanged. Override or disable the visual
15007
- * treatment via the `focus` config — `focus: false` keeps `setFocus` writing feature-state
15008
- * but emits no halo layer and no width pop, leaving callers free to drive their own
15009
- * styling off `feature-state.focused`.
15023
+ * are unchanged. A hovered or clicked incident (its `eventState`, see
15024
+ * {@link putEventState}) draws the same treatment. Override or disable it via the `focus`
15025
+ * config — `focus: false` keeps `setFocus` writing feature-state but emits no halo layer
15026
+ * and no width pop, leaving callers free to drive their own styling off
15027
+ * `feature-state.focused` and `eventState`.
15010
15028
  *
15011
15029
  * ## API limitations
15012
15030
  *
@@ -15044,60 +15062,59 @@ type Sources = {
15044
15062
  * Fetch and render incidents for Amsterdam:
15045
15063
  * ```typescript
15046
15064
  * import { TomTomConfig } from '@tomtom-org/maps-sdk/core';
15047
- * import { TomTomMap, TrafficIncidentOverlayModule } from '@tomtom-org/maps-sdk/map';
15065
+ * import { TomTomMap, TrafficIncidentDetailsModule } from '@tomtom-org/maps-sdk/map';
15048
15066
  * import { trafficIncidentDetails } from '@tomtom-org/maps-sdk/services';
15049
15067
  *
15050
15068
  * TomTomConfig.instance.put({ apiKey: '<API_KEY>' });
15051
15069
  *
15052
15070
  * const map = new TomTomMap({ mapLibre: { container: 'map', center: [4.9, 52.37], zoom: 13 } });
15053
15071
  *
15054
- * const overlay = await TrafficIncidentOverlayModule.create(map);
15072
+ * const incidentDetailsModule = await TrafficIncidentDetailsModule.create(map);
15055
15073
  * const result = await trafficIncidentDetails({
15056
15074
  * bbox: [4.85, 52.34, 4.95, 52.40],
15057
15075
  * timeValidityFilter: ['present'],
15058
15076
  * });
15059
- * await overlay.show(result);
15077
+ * await incidentDetailsModule.show(result);
15060
15078
  *
15061
15079
  * // Highlight a subset.
15062
- * overlay.setFocus([result.features[0].properties.id as string]);
15080
+ * incidentDetailsModule.setFocus([result.features[0].properties.id as string]);
15063
15081
  * ```
15064
15082
  *
15065
15083
  * @see {@link TrafficIncidentsModule} — the vector-tile alternative. Hidden in the
15066
15084
  * default style; if you've enabled it explicitly elsewhere in your app, hide it again
15067
- * before using the overlay to avoid double-rendering.
15068
- * @see [Traffic Incident Overlay Guide](https://docs.tomtom.com/maps-sdk-js/guides/map/traffic-incident-overlay)
15085
+ * before using this module to avoid double-rendering.
15086
+ * @see [Traffic Incident Details Guide](https://docs.tomtom.com/maps-sdk-js/guides/map/traffic-incident-details)
15069
15087
  * @see [Traffic Incident Details Service](https://docs.tomtom.com/maps-sdk-js/guides/services/traffic/traffic-incident-details)
15070
15088
  *
15071
15089
  * @group Traffic
15072
15090
  */
15073
- export declare class TrafficIncidentOverlayModule extends AbstractDataOwnedMapModule<Sources, TrafficIncidentOverlayModuleConfig> {
15074
- private lastResult;
15091
+ export declare class TrafficIncidentDetailsModule extends AbstractDataOwnedMapModule<Sources, TrafficIncidentDetailsModuleConfig> {
15075
15092
  private lastFeatureIds;
15076
15093
  private lastFocusIds;
15077
15094
  private readonly shownFeaturesHandlers;
15078
15095
  /**
15079
15096
  * Creates a new module instance on the given map, waiting until the map is ready first.
15080
15097
  *
15081
- * `TrafficIncidentOverlayModule` owns the sources, layers and images it adds, all suffixed per
15098
+ * `TrafficIncidentDetailsModule` owns the sources, layers and images it adds, all suffixed per
15082
15099
  * instance. Every call therefore returns a **new, independent** instance, and stacking several
15083
15100
  * of them on one map is a supported thing to do.
15084
15101
  *
15085
- * {@link trafficIncidentOverlayKnobCatalogue} lists the plain-valued settings of `config` as data.
15102
+ * {@link trafficIncidentDetailsKnobCatalogue} lists the plain-valued settings of `config` as data.
15086
15103
  *
15087
15104
  * @param tomtomMap The TomTomMap instance.
15088
15105
  * @param config The module optional configuration.
15089
15106
  * @returns {Promise} Returns a promise with a new instance of this module.
15090
15107
  */
15091
- static create(tomtomMap: TomTomMap, config?: TrafficIncidentOverlayModuleConfig): Promise<TrafficIncidentOverlayModule>;
15108
+ static create(tomtomMap: TomTomMap, config?: TrafficIncidentDetailsModuleConfig): Promise<TrafficIncidentDetailsModule>;
15092
15109
  private constructor();
15093
15110
  private buildLayerSpecs;
15094
15111
  private updateLayers;
15095
15112
  /** @ignore */
15096
- protected _initSourcesWithLayers(config?: TrafficIncidentOverlayModuleConfig, _restore?: boolean): Sources;
15113
+ protected _initSourcesWithLayers(config?: TrafficIncidentDetailsModuleConfig, _restore?: boolean): Sources;
15097
15114
  /** @ignore */
15098
- protected _applyConfig(config: TrafficIncidentOverlayModuleConfig | undefined): TrafficIncidentOverlayModuleConfig | undefined;
15115
+ protected _applyConfig(config: TrafficIncidentDetailsModuleConfig | undefined): TrafficIncidentDetailsModuleConfig | undefined;
15099
15116
  /** @ignore */
15100
- protected applyVisibility(config: TrafficIncidentOverlayModuleConfig | undefined): void;
15117
+ protected applyVisibility(config: TrafficIncidentDetailsModuleConfig | undefined): void;
15101
15118
  private applyBeforeLayer;
15102
15119
  /** @ignore */
15103
15120
  protected discardShownData(): void;
@@ -15111,10 +15128,6 @@ export declare class TrafficIncidentOverlayModule extends AbstractDataOwnedMapMo
15111
15128
  * Remove all rendered incidents (source kept, data emptied).
15112
15129
  */
15113
15130
  clear(): Promise<void>;
15114
- /**
15115
- * Move incident layers before the given map-style layer, or to the top.
15116
- */
15117
- moveBeforeLayer(beforeLayerConfig: BeforeLayerConfig): void;
15118
15131
  /**
15119
15132
  * Returns the currently shown incidents — the exact data that was passed to {@link show}.
15120
15133
  *
@@ -15127,7 +15140,9 @@ export declare class TrafficIncidentOverlayModule extends AbstractDataOwnedMapMo
15127
15140
  getShown(): {
15128
15141
  incidents: TrafficIncidentDetails;
15129
15142
  };
15130
- get events(): CombinedEvents<TrafficIncident, TrafficIncidentOverlayModuleConfig, TrafficIncidentDetails>;
15143
+ /** @ignore */
15144
+ protected eventStateSources(): (keyof Sources)[];
15145
+ get events(): CombinedEvents<TrafficIncident, TrafficIncidentDetailsModuleConfig, TrafficIncidentDetails>;
15131
15146
  /**
15132
15147
  * Mark a subset of currently-rendered incidents as "focused" via MapLibre
15133
15148
  * feature-state. `null` clears the state. Paint expressions in
@@ -15241,23 +15256,13 @@ type TrafficIncidentsSourcesWithLayers = {
15241
15256
  * Filter by incident type:
15242
15257
  * ```typescript
15243
15258
  * // Show only accidents and road closures
15244
- * trafficIncidentsModule.filter({
15245
- * any: [{
15246
- * incidentCategories: {
15247
- * show: 'only',
15248
- * values: ['accident', 'road-closed']
15249
- * }
15250
- * }]
15259
+ * trafficIncidentsModule.updateConfig({
15260
+ * filters: { any: [{ incidentCategories: { show: 'only', values: ['accident', 'road-closed'] } }] },
15251
15261
  * });
15252
15262
  *
15253
15263
  * // Hide construction
15254
- * trafficIncidentsModule.filter({
15255
- * any: [{
15256
- * incidentCategories: {
15257
- * show: 'all-except',
15258
- * values: ['roadworks']
15259
- * }
15260
- * }]
15264
+ * trafficIncidentsModule.updateConfig({
15265
+ * filters: { any: [{ incidentCategories: { show: 'all-except', values: ['roadworks'] } }] },
15261
15266
  * });
15262
15267
  * ```
15263
15268
  *
@@ -15265,31 +15270,20 @@ type TrafficIncidentsSourcesWithLayers = {
15265
15270
  * Filter by severity:
15266
15271
  * ```typescript
15267
15272
  * // Show only major delays
15268
- * incidents.filter({
15269
- * any: [{
15270
- * magnitudes: {
15271
- * show: 'only',
15272
- * values: ['major']
15273
- * }
15274
- * }]
15275
- * });
15273
+ * incidents.updateConfig({ filters: { any: [{ magnitudes: { show: 'only', values: ['major'] } }] } });
15276
15274
  *
15277
15275
  * // Show incidents with at least 10 minutes delay
15278
- * incidents.filter({
15279
- * any: [{
15280
- * delays: {
15281
- * mustHaveDelay: true,
15282
- * minDelayMinutes: 10
15283
- * }
15284
- * }]
15285
- * });
15276
+ * incidents.updateConfig({ filters: { any: [{ delays: { mustHaveDelay: true, minDelayMinutes: 10 } }] } });
15277
+ *
15278
+ * // Show every incident again
15279
+ * incidents.updateConfig({ filters: undefined });
15286
15280
  * ```
15287
15281
  *
15288
15282
  * @see [Traffic Incidents Guide](https://docs.tomtom.com/maps-sdk-js/guides/map/traffic-incidents)
15289
15283
  * @see [Traffic Guide](https://docs.tomtom.com/maps-sdk-js/guides/map/traffic)
15290
- * @see {@link TrafficIncidentOverlayModule} — for rendering incidents fetched via the
15284
+ * @see {@link TrafficIncidentDetailsModule} — for rendering incidents fetched via the
15291
15285
  * `trafficIncidentDetails()` REST service as a developer-controlled overlay (use the
15292
- * overlay when you need typed incident objects in app code; this vector-tile module
15286
+ * details module when you need typed incident objects in app code; this vector-tile module
15293
15287
  * remains the recommended default for visual fidelity).
15294
15288
  *
15295
15289
  * @group Traffic Incidents
@@ -15355,63 +15349,7 @@ export declare class TrafficIncidentsModule extends AbstractStyleOwnedMapModule<
15355
15349
  * @ignore
15356
15350
  */
15357
15351
  protected _applyConfig(config: TrafficIncidentsModuleConfig | undefined): TrafficIncidentsModuleConfig | undefined;
15358
- /**
15359
- * Applies filters to traffic incidents display, incident lines and icons alike.
15360
- *
15361
- * @param filters - Pass `undefined` to reset.
15362
- *
15363
- * @remarks
15364
- * **Filter Options:**
15365
- * - `incidentCategories`: Filter by incident type
15366
- * - `magnitudes`: Filter by delay severity (minor/moderate/major/unknown)
15367
- * - `delays`: Filter by delay duration
15368
- * - `roadCategories`: Filter by road importance
15369
- * - `roadSubCategories`: Filter by specific road types
15370
- *
15371
- * **Available Incident Categories:**
15372
- * - `accident`, `road-closed`, `lane-closed`
15373
- * - `roadworks` (construction)
15374
- * - `jam` (traffic jam)
15375
- * - `fog`, `rain`, `frost`, `wind`, `flooding`
15376
- * - `danger`, `animals-on-road`, `narrow-lanes`
15377
- * - `broken-down-vehicle`
15378
- * - `other`
15379
- *
15380
- * **Delay Magnitudes:**
15381
- * - `minor`: Small delays
15382
- * - `moderate`: Moderate delays
15383
- * - `major`: Significant delays
15384
- * - `unknown`: Unknown or no delay info
15385
- *
15386
- * @example
15387
- * Filter by type:
15388
- * ```typescript
15389
- * incidents.filter({
15390
- * any: [{
15391
- * incidentCategories: {
15392
- * show: 'only',
15393
- * values: ['accident', 'road-closed']
15394
- * }
15395
- * }]
15396
- * });
15397
- * ```
15398
- *
15399
- * @example
15400
- * Filter by severity and delay:
15401
- * ```typescript
15402
- * incidents.filter({
15403
- * any: [{
15404
- * magnitudes: { show: 'only', values: ['major', 'moderate'] },
15405
- * delays: {
15406
- * mustHaveDelay: true,
15407
- * minDelayMinutes: 5
15408
- * }
15409
- * }]
15410
- * });
15411
- * ```
15412
- */
15413
- filter(filters?: TrafficIncidentsFilters): void;
15414
- private _filter;
15352
+ private applyFilters;
15415
15353
  private getLayers;
15416
15354
  /**
15417
15355
  * Sets the visibility of incident icon layers.
@@ -15419,7 +15357,9 @@ export declare class TrafficIncidentsModule extends AbstractStyleOwnedMapModule<
15419
15357
  * @param visible - `true` to show icons, `false` to hide them.
15420
15358
  *
15421
15359
  * @remarks
15422
- * This controls only the icon/symbol layers, not the incident area polygons or lines.
15360
+ * This controls only the icon/symbol layers, not the incident area polygons or lines. It stores
15361
+ * `icons.visible`, which overrides `visible` for the icons until the next {@link setVisible}:
15362
+ * `setVisible(false)` then `setIconsVisible(true)` shows the icons alone.
15423
15363
  *
15424
15364
  * @example
15425
15365
  * ```typescript
@@ -15438,7 +15378,8 @@ export declare class TrafficIncidentsModule extends AbstractStyleOwnedMapModule<
15438
15378
  * @param visible - `true` to show incidents, `false` to hide them.
15439
15379
  *
15440
15380
  * @remarks
15441
- * This controls all incident layers including icons, lines, and polygons.
15381
+ * This controls all incident layers including icons, lines, and polygons, and clears
15382
+ * `icons.visible`, so the icons follow `visible` again.
15442
15383
  *
15443
15384
  * @example
15444
15385
  * ```typescript
@@ -15452,7 +15393,7 @@ export declare class TrafficIncidentsModule extends AbstractStyleOwnedMapModule<
15452
15393
  * Whether traffic incidents are set to be shown.
15453
15394
  *
15454
15395
  * @returns The `visible` setting; `false` while nothing has set it, as traffic is hidden until
15455
- * shown. {@link anyIconLayersVisible} reads the icon layers themselves.
15396
+ * shown. {@link isIconsVisible} reads the icons setting.
15456
15397
  *
15457
15398
  * @example
15458
15399
  * ```typescript
@@ -15463,18 +15404,19 @@ export declare class TrafficIncidentsModule extends AbstractStyleOwnedMapModule<
15463
15404
  */
15464
15405
  isVisible(): boolean;
15465
15406
  /**
15466
- * Checks if any incident icon layers are currently visible.
15407
+ * Whether the incident icons are set to be shown.
15467
15408
  *
15468
- * @returns `true` if any icon layer is visible, `false` if all icons are hidden.
15409
+ * @returns The `icons.visible` setting and, while it is unset, {@link isVisible}. It is `true`
15410
+ * for the icons-only state, `{ visible: false, icons: { visible: true } }`.
15469
15411
  *
15470
15412
  * @example
15471
15413
  * ```typescript
15472
- * if (incidents.anyIconLayersVisible()) {
15473
- * console.log('Incident icons are shown');
15474
- * }
15414
+ * incidents.setVisible(false);
15415
+ * incidents.setIconsVisible(true);
15416
+ * incidents.isIconsVisible(); // true: the icons show alone
15475
15417
  * ```
15476
15418
  */
15477
- anyIconLayersVisible(): boolean;
15419
+ isIconsVisible(): boolean;
15478
15420
  /**
15479
15421
  * Returns features currently visible in the viewport.
15480
15422
  *
@@ -15639,4 +15581,4 @@ export declare const calculatePaddedCenter: (options: CalculateMapCenterOptions)
15639
15581
  */
15640
15582
  export declare const calculateFittingBBox: (options: CalculateFittingBBoxOptions) => BBox | null;
15641
15583
  //#endregion
15642
- export type { AREA_ANALYTICS_DEFAULTS, AreaAnalyticsBeforeLayerConfig, AreaAnalyticsColorStop, AreaAnalyticsColorStopsConfig, AreaAnalyticsColorTheme, AreaAnalyticsDisplayMode, AreaAnalyticsHeightConfig, AreaAnalyticsMetricConfig, AreaAnalyticsMetricFilter, AreaAnalyticsRegionPolygonConfig, AreaAnalyticsValueType, AvailabilityLevel, BaseMapColorName, BaseMapKnob, BaseMapKnobId, BaseMapKnobValueOf, BeforeLayerConfig, BespokeSectionType, ByIdOrIndex, CSSCursor, ChargingSpeedIconMapping, ChargingStopIconConfig, ChargingStopIconMapping, ChargingStopLabelConfig, ChargingStopsConfig, CleanEventStateOptions, CleanEventStatesOptions, ClickEventType, CountryCrossingAlignment, CountryCrossingConfig, CountryCrossingFeature, CustomGeoJSONKnob, CustomGeoJSONKnobId, CustomGeoJSONKnobValueOf, CustomImage, DefaultPlaceIconConfig, DisplayCountryCrossing, DisplayCountryCrossingProps, DisplayCountryCrossings, DisplayRouteProps, DisplayRouteRelatedProps, DisplayRouteSummaries, DisplayRouteSummary, DisplayRouteSummaryProps, DrawnSectionType, EVAvailabilityConfig, EventHandlerConfig, EventHandlerCursorConfig, EventHandlerHoverConfig, EventState, EventType, ExtraFeatureProp, FeaturePropValue, FilterablePOICategory, GeneratedSectionType, GeoJSONSourcesWithLayers, GeometriesKnob, GeometriesKnobId, GeometriesKnobValueOf, HasAdditionalLayersConfig, HasBeforeID, HoverEventType, HslColor, LabelConfig, LayerQuery, LayerSpecFilter, LayerSpecTemplate, LayerSpecWithSource, LightDark, MapColorName, MapColors, MapEventsConfig, MapFont, MapModuleCommonConfig, MapStyleLayerID, POIsKnob, POIsKnobId, POIsKnobValueOf, POIsModuleConfig, POIsModuleFeature, PartsBeforeLayerConfig, PlaceClusterBadgeConfig, PlaceConnectionDisplay, PlaceConnectionLayerName, PlaceConnectionsConfig, PlaceConnectionsLayersConfig, PlaceEntryPointFeature, PlaceEntryPointProps, PlaceEntryPointsConfig, PlaceEntryPointsLayersConfig, PlaceEntryPointsShowFor, PlaceIconConfig, PlaceLabelConfig, PlaceLayerName, PlaceLayersConfig, PlacesClusterConfig, PlacesKnob, PlacesKnobId, PlacesKnobValueOf, PlacesMarkerType, PlacesModuleConfig, PlacesModuleSerializableConfig, PlanningWaypoint, PutEventStateOptions, RGBAColor, RouteLayersConfig, RouteStateProps, RouteWaypointSize, RouteWidth, RoutingBeforeLayerConfig, RoutingKnob, RoutingKnobId, RoutingKnobValueOf, RoutingModuleConfig, RoutingModuleSerializableConfig, SVGIconStyleOptions, SectionDisplayConfig, SectionDrawStyle, SectionIconConfig, SectionIconPlacement, SectionKnobName, SectionKnobOf, SectionLineLayerName, SectionLinePattern, SectionSignConfig, SectionSignLayerName, SectionSignPlacement, SectionSignPriority, SectionSignUnit, SectionSourceKey, SectionSymbolLayerName, SectionsDisplayConfig, SerializableCustomImage, SourceWithLayerIDs, SourceWithLayers, SourcesWithLayers, StyleSourcesWithLayers, StylingColorKnobId, StylingKnob, StylingKnobAppliesTo, StylingKnobId, StylingKnobKind, StylingKnobRange, StylingKnobValue, StylingKnobValueOf, StylingPreset, StylingPresetId, StylingSettings, SupportsEvents, SymbolLayerSpecWithoutSource, TRAFFIC_LIGHT_COLORS, TerrainKnob, TerrainKnobId, TerrainKnobValueOf, TerrainModuleConfig, ToBeAddedLayerSpec, ToBeAddedLayerSpecTemplate, ToBeAddedLayerSpecWithoutSource, TrafficAreaAnalyticsKnob, TrafficAreaAnalyticsKnobId, TrafficAreaAnalyticsKnobValueOf, TrafficAreaAnalyticsModuleConfig, TrafficFlowKnob, TrafficFlowKnobId, TrafficFlowKnobValueOf, TrafficIncidentOverlayKnob, TrafficIncidentOverlayKnobId, TrafficIncidentOverlayKnobValueOf, TrafficIncidentsKnob, TrafficIncidentsKnobId, TrafficIncidentsKnobValueOf, UserEventHandler, WaypointsConfig };
15584
+ export type { AREA_ANALYTICS_DEFAULTS, AreaAnalyticsBeforeLayerConfig, AreaAnalyticsColorStop, AreaAnalyticsColorStopsConfig, AreaAnalyticsDisplayMode, AreaAnalyticsHeightConfig, AreaAnalyticsMetricConfig, AreaAnalyticsMetricFilter, AreaAnalyticsPalette, AreaAnalyticsRegionPolygonConfig, AreaAnalyticsValueType, AvailabilityLevel, BaseMapColorName, BaseMapKnob, BaseMapKnobId, BaseMapKnobValueOf, BeforeLayerConfig, BespokeSectionType, ByIdOrIndex, CSSCursor, ChargingSpeedIconMapping, ChargingStopIconConfig, ChargingStopIconMapping, ChargingStopLabelConfig, ChargingStopsConfig, CleanEventStateOptions, CleanEventStatesOptions, ClickEventType, CountryCrossingAlignment, CountryCrossingConfig, CountryCrossingFeature, CustomGeoJSONKnob, CustomGeoJSONKnobId, CustomGeoJSONKnobValueOf, CustomImage, DefaultPlaceIconConfig, DisplayCountryCrossing, DisplayCountryCrossingProps, DisplayCountryCrossings, DisplayRouteProps, DisplayRouteRelatedProps, DisplayRouteSummaries, DisplayRouteSummary, DisplayRouteSummaryProps, DrawnSectionType, EVAvailabilityConfig, EventHandlerConfig, EventHandlerCursorConfig, EventHandlerHoverConfig, EventState, EventStateIds, EventType, ExtraFeatureProp, FeaturePropValue, FilterablePOICategory, GeneratedSectionType, GeoJSONSourcesWithLayers, GeometriesKnob, GeometriesKnobId, GeometriesKnobValueOf, HasAdditionalLayersConfig, HasBeforeID, HoverEventType, HslColor, LabelConfig, LayerQuery, LayerSpecFilter, LayerSpecTemplate, LayerSpecWithSource, LightDark, MapColorName, MapColors, MapEventsConfig, MapFont, MapModuleCommonConfig, MapStyleLayerID, POIsKnob, POIsKnobId, POIsKnobValueOf, POIsModuleConfig, POIsModuleFeature, PartsBeforeLayerConfig, PlaceClusterBadgeConfig, PlaceConnectionDisplay, PlaceConnectionLayerName, PlaceConnectionsConfig, PlaceConnectionsLayersConfig, PlaceEntryPointFeature, PlaceEntryPointProps, PlaceEntryPointsConfig, PlaceEntryPointsLayersConfig, PlaceEntryPointsShowFor, PlaceIconConfig, PlaceLabelConfig, PlaceLayerName, PlaceLayersConfig, PlacesBeforeLayerConfig, PlacesClusterConfig, PlacesKnob, PlacesKnobId, PlacesKnobValueOf, PlacesMarkerType, PlacesModuleConfig, PlacesModuleSerializableConfig, PlanningWaypoint, PutEventStateOptions, RGBAColor, ReachableRangesKnob, ReachableRangesKnobId, ReachableRangesKnobValueOf, RouteHighlightConfig, RouteLayersConfig, RouteStateProps, RouteWaypointSize, RouteWidth, RoutingBeforeLayerConfig, RoutingKnob, RoutingKnobId, RoutingKnobValueOf, RoutingModuleConfig, RoutingModuleSerializableConfig, SVGIconStyleOptions, SectionDisplayConfig, SectionDrawStyle, SectionIconConfig, SectionIconPlacement, SectionKnobName, SectionKnobOf, SectionLineLayerName, SectionLinePattern, SectionSignConfig, SectionSignLayerName, SectionSignPlacement, SectionSignPriority, SectionSignUnit, SectionSourceKey, SectionSymbolLayerName, SectionsDisplayConfig, SerializableCustomImage, SourceWithLayerIDs, SourceWithLayers, SourcesWithLayers, StyleSourcesWithLayers, StylingColorKnobId, StylingKnob, StylingKnobAppliesTo, StylingKnobId, StylingKnobKind, StylingKnobRange, StylingKnobValue, StylingKnobValueOf, StylingPreset, StylingPresetId, StylingSettings, SupportsEvents, SymbolLayerSpecWithoutSource, TerrainKnob, TerrainKnobId, TerrainKnobValueOf, TerrainModuleConfig, ToBeAddedLayerSpec, ToBeAddedLayerSpecTemplate, ToBeAddedLayerSpecWithoutSource, TrafficAreaAnalyticsKnob, TrafficAreaAnalyticsKnobId, TrafficAreaAnalyticsKnobValueOf, TrafficAreaAnalyticsModuleConfig, TrafficFlowKnob, TrafficFlowKnobId, TrafficFlowKnobValueOf, TrafficIncidentDetailsKnob, TrafficIncidentDetailsKnobId, TrafficIncidentDetailsKnobValueOf, TrafficIncidentsKnob, TrafficIncidentsKnobId, TrafficIncidentsKnobValueOf, UserEventHandler, WaypointsConfig };