@tomtom-org/maps-sdk 0.56.0 → 0.58.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.
@@ -1,5 +1,5 @@
1
- import { BackgroundLayerSpecification, CircleLayerSpecification, DataDrivenPropertyValueSpecification, ExpressionFilterSpecification, ExpressionSpecification, GeoJSONSource, GeoJSONSourceSpecification, LayerSpecification, LineLayerSpecification, LngLat, Map, MapGeoJSONFeature, MapOptions, Source, SourceSpecification, StyleImageInterface, StyleImageMetadata, StyleSpecification, SymbolLayerSpecification } from "maplibre-gl";
2
- import { Anything, AreaAnalyticsMetricKey, AreaAnalyticsMetrics, BBox, ChargingSpeed, ChargingStop, ChargingStopProps, CommonPlaceProps, CountrySectionProps, DelayMagnitude, DisplayUnits, GetPositionEntryPointOption, GlobalConfig, Instruction, Language, POICategory, Place, Places, PolygonFeature, PolygonFeatures, Route, RouteProps, Routes, SectionProps, SectionType, TrafficAreaAnalytics, TrafficIncident, TrafficIncidentBaseProperties, TrafficIncidentCategory, TrafficIncidentDetails, TrafficIncidentTimeValidity, TrafficSectionProps, Waypoint, WaypointLike, Waypoints } from "@tomtom-org/maps-sdk/core";
1
+ import { AllLayoutProperties, AllPaintProperties, BackgroundLayerSpecification, CircleLayerSpecification, DataDrivenPropertyValueSpecification, ExpressionFilterSpecification, ExpressionSpecification, FilterSpecification, GeoJSONSource, GeoJSONSourceSpecification, LayerSpecification, LineLayerSpecification, LngLat, Map, MapGeoJSONFeature, MapOptions, Source, SourceSpecification, StyleImageInterface, StyleImageMetadata, StyleSpecification, SymbolLayerSpecification } from "maplibre-gl";
2
+ import { Anything, AreaAnalyticsMetricKey, AreaAnalyticsMetrics, BBox, ChargingSpeed, ChargingStop, ChargingStopProps, CommonPlaceProps, CountrySectionProps, DelayMagnitude, DisplayUnits, EntryPoint, GetPositionEntryPointOption, GlobalConfig, Instruction, Language, POICategory, Place, Places, PolygonFeature, PolygonFeatures, Route, RouteProps, Routes, SectionProps, SectionType, TrafficAreaAnalytics, TrafficIncident, TrafficIncidentBaseProperties, TrafficIncidentCategory, TrafficIncidentDetails, TrafficIncidentTimeValidity, TrafficSectionProps, Waypoint, WaypointLike, Waypoints } from "@tomtom-org/maps-sdk/core";
3
3
  //#region src/shared/types/style.d.ts
4
4
  /**
5
5
  * Indicator of a light or dark theme.
@@ -27,7 +27,8 @@ type LightDark = 'light' | 'dark';
27
27
  * precisionMode: 'box',
28
28
  * paddingBoxPx: 5,
29
29
  * cursorOnHover: 'pointer',
30
- * longHoverDelayOnStillMapMS: 300
30
+ * longHoverDelayOnStillMapMS: 300,
31
+ * hoverGracePeriodMS: 400
31
32
  * };
32
33
  *
33
34
  * // Mobile-optimized with larger hit area
@@ -46,7 +47,7 @@ type LightDark = 'light' | 'dark';
46
47
  *
47
48
  * @group User Interaction Events
48
49
  */
49
- type MapEventsConfig = EventHandlerCursorConfig & {
50
+ type MapEventsConfig = EventHandlerConfig & {
50
51
  /**
51
52
  * Optional configuration to show custom cursor when clicking (mouse down).
52
53
  *
@@ -311,7 +312,7 @@ export type StandardStyle = {
311
312
  * Available modules:
312
313
  * - `trafficIncidents`: Real-time traffic incidents (accidents, closures)
313
314
  * - `trafficFlow`: Real-time traffic flow visualization
314
- * - `hillshade`: Terrain elevation shading
315
+ * - `hillshade`: Terrain elevation data, for hillshade shading and 3D terrain
315
316
  *
316
317
  * @example
317
318
  * ```typescript
@@ -432,7 +433,7 @@ export declare const styleModules: readonly ["trafficIncidents", "trafficFlow",
432
433
  * @remarks
433
434
  * - `trafficIncidents`: Shows real-time traffic incidents on the map
434
435
  * - `trafficFlow`: Shows real-time traffic flow with color-coded speeds
435
- * - `hillshade`: Adds terrain elevation shading for topographic context
436
+ * - `hillshade`: Adds terrain elevation data, drawn by {@link TerrainModule} as hillshade shading and 3D terrain
436
437
  *
437
438
  * @group Map Style
438
439
  */
@@ -547,20 +548,12 @@ export type TomTomMapParams = Partial<GlobalConfig> & {
547
548
  */
548
549
  style?: StyleInput;
549
550
  /**
550
- * Event handler configuration for map interactions.
551
- *
552
- * Define callbacks for various map events like clicks, hovers, and movements.
551
+ * How user events are detected and timed, and which cursors they show, for every module.
552
+ * Change it later with {@link TomTomMap.updateEventsConfig}.
553
553
  *
554
554
  * @example
555
555
  * ```typescript
556
- * events: {
557
- * onClick: (event) => {
558
- * console.log('Clicked at', event.lngLat);
559
- * },
560
- * onMoveEnd: () => {
561
- * console.log('Map moved to', map.getCenter());
562
- * }
563
- * }
556
+ * events: { paddingBoxPx: 10, longHoverDelayOnStillMapMS: 500, hoverGracePeriodMS: 1000 }
564
557
  * ```
565
558
  */
566
559
  events?: MapEventsConfig;
@@ -577,7 +570,6 @@ export type TomTomMapParams = Partial<GlobalConfig> & {
577
570
  * zoom: 12,
578
571
  * pitch: 45,
579
572
  * bearing: -17.6,
580
- * antialias: true,
581
573
  * maxZoom: 18,
582
574
  * minZoom: 8
583
575
  * }
@@ -944,7 +936,6 @@ export declare class TomTomMap {
944
936
  * zoom: 13,
945
937
  * pitch: 45,
946
938
  * bearing: -17.6,
947
- * antialias: true,
948
939
  * maxZoom: 18,
949
940
  * minZoom: 8
950
941
  * }
@@ -1163,6 +1154,22 @@ export declare class TomTomMap {
1163
1154
  * @see {@link https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes | ISO 639-1 Language Codes}
1164
1155
  */
1165
1156
  setLanguage(language: Language): void;
1157
+ /**
1158
+ * Changes the map's user events configuration at runtime.
1159
+ *
1160
+ * @param config Merged into the current configuration, set at construction through
1161
+ * {@link TomTomMapParams.events}: what it leaves out, or sets `undefined`, keeps its value.
1162
+ *
1163
+ * @remarks
1164
+ * A module's own `events` config still overrides the cursor and `hoverGracePeriodMS` for its
1165
+ * features. A long hover or a grace period already running keeps the delay it started with.
1166
+ *
1167
+ * @example
1168
+ * ```typescript
1169
+ * map.updateEventsConfig({ longHoverDelayOnStillMapMS: 600, hoverGracePeriodMS: 1000 });
1170
+ * ```
1171
+ */
1172
+ updateEventsConfig(config: MapEventsConfig): void;
1166
1173
  /**
1167
1174
  * Retrieves the current visible map area as a GeoJSON bounding box.
1168
1175
  *
@@ -1779,8 +1786,13 @@ export type GeoJSONSourceClusterOptions = Pick<GeoJSONSourceSpecification, 'clus
1779
1786
  */
1780
1787
  export declare class GeoJSONSourceWithLayers<T extends FeatureCollection = FeatureCollection> extends AddedSourceWithLayers<GeoJSONSourceSpecification, GeoJSONSource> {
1781
1788
  shownFeatures: T;
1789
+ private readonly showListeners;
1782
1790
  constructor(map: Map, sourceId: string, layerSpecs: ToBeAddedLayerSpecWithoutSource[], addLayersToMap?: boolean, clusterOptions?: GeoJSONSourceClusterOptions);
1783
1791
  show(featureCollection: T, { automaticVisibility }?: ShowOptions): void;
1792
+ /**
1793
+ * Calls `listener` after every `show`, including the ones an event-state change makes.
1794
+ */
1795
+ onShow(listener: () => void): void;
1784
1796
  /**
1785
1797
  * Canonical id-based lookup into `shownFeatures.features` via {@link findFeatureByRefId}
1786
1798
  * (first match wins on duplicate ids). Returns `undefined` for a nullish or absent id.
@@ -2061,6 +2073,18 @@ type HoverEventType = 'hover' | 'hover-move' | 'long-hover';
2061
2073
  * @group User Interaction Events
2062
2074
  */
2063
2075
  type EventType = ClickEventType | HoverEventType;
2076
+ /**
2077
+ * The state a feature carries in `properties.eventState`: the user event it is in, or
2078
+ * `recently-hovered` for a moment after the pointer leaves it.
2079
+ *
2080
+ * @remarks
2081
+ * `recently-hovered` lasts {@link EventHandlerHoverConfig.hoverGracePeriodMS}, then clears on its own
2082
+ * unless the feature is hovered or clicked again first. The SDK's own layers draw it as no state;
2083
+ * read it to keep something shown while the pointer travels, as the entry points of places do.
2084
+ *
2085
+ * @group User Interaction Events
2086
+ */
2087
+ type EventState = EventType | 'recently-hovered';
2064
2088
  /**
2065
2089
  * Parameters to identify a feature by its ID or index in a given features array.
2066
2090
  * @group User Interaction Events
@@ -2241,7 +2265,7 @@ type CleanEventStatesOptions = {
2241
2265
  * states: ['click', 'contextmenu', 'hover', 'long-hover']
2242
2266
  * ```
2243
2267
  */
2244
- states?: EventType[];
2268
+ states?: EventState[];
2245
2269
  /**
2246
2270
  * Whether to show the feature after cleaning the event state.
2247
2271
  *
@@ -2288,11 +2312,12 @@ type SupportsEvents = {
2288
2312
  * @remarks
2289
2313
  * - `undefined`: No active event state (normal appearance)
2290
2314
  * - Event type: Active state that affects styling and behavior
2315
+ * - `recently-hovered`: The pointer just left the feature; see {@link EventState}
2291
2316
  *
2292
2317
  * This property is automatically managed by the SDK based on user
2293
2318
  * interactions and programmatic state changes.
2294
2319
  */
2295
- eventState?: EventType;
2320
+ eventState?: EventState;
2296
2321
  };
2297
2322
  /**
2298
2323
  * Handler function for user interaction events on map features.
@@ -2389,103 +2414,66 @@ type EventHandlerCursorConfig = {
2389
2414
  */
2390
2415
  cursorOnHover?: CSSCursor;
2391
2416
  };
2417
+ /**
2418
+ * Event configuration options related to hover states.
2419
+ *
2420
+ * @group User Interaction Events
2421
+ */
2422
+ type EventHandlerHoverConfig = {
2423
+ /**
2424
+ * How long, in milliseconds, a feature stays `recently-hovered` after the pointer leaves it.
2425
+ * `0` clears its state at once.
2426
+ *
2427
+ * @remarks
2428
+ * Set on the map (`events` of the map parameters) for every module, or on one module's
2429
+ * `events` config to override it there.
2430
+ *
2431
+ * @default 400
2432
+ */
2433
+ hoverGracePeriodMS?: number;
2434
+ };
2392
2435
  /**
2393
2436
  * Optional events configuration for a map module.
2394
2437
  *
2395
2438
  * @group User Interaction Events
2396
2439
  */
2397
- type EventHandlerConfig = EventHandlerCursorConfig;
2440
+ type EventHandlerConfig = EventHandlerCursorConfig & EventHandlerHoverConfig;
2398
2441
  //#endregion
2399
2442
  //#region src/shared/types/filters.d.ts
2400
2443
  /**
2401
- * Filter mode determining whether to include or exclude specified values.
2402
- *
2403
- * @remarks
2404
- * Controls how the values list is interpreted:
2405
- * - `all_except`: Show everything except the specified values (exclusion mode)
2406
- * - `only`: Show only the specified values, hide everything else (inclusion mode)
2407
- *
2408
- * @example
2409
- * ```typescript
2410
- * // Exclusion mode
2411
- * const mode: FilterShowMode = 'all_except';
2412
- *
2413
- * // Inclusion mode
2414
- * const mode: FilterShowMode = 'only';
2415
- * ```
2444
+ * Every {@link FilterShowMode}, for validating one at runtime.
2416
2445
  *
2417
2446
  * @group Shared
2418
2447
  */
2419
- type FilterShowMode = 'all_except' | 'only';
2448
+ export declare const filterShowModes: readonly ["only", "all-except"];
2420
2449
  /**
2421
- * Generic filter configuration for showing or hiding items by value.
2422
- *
2423
- * Provides a flexible way to control visibility of categorized items (e.g., POI categories,
2424
- * layer groups, road types) using either inclusion or exclusion mode.
2425
- *
2426
- * @typeParam T - The type of values being filtered (e.g., string literals, enums)
2450
+ * How a {@link ValuesFilter} reads its `values`:
2451
+ * - `only`: show only these values, hide everything else
2452
+ * - `all-except`: show everything except these values
2427
2453
  *
2428
- * @remarks
2429
- * **Filter Modes:**
2430
- * - `only`: Whitelist mode - only specified values are shown
2431
- * - `all_except`: Blacklist mode - all values except specified ones are shown
2454
+ * @group Shared
2455
+ */
2456
+ export type FilterShowMode = (typeof filterShowModes)[number];
2457
+ /**
2458
+ * Shows or hides items by value — POI categories, traffic road categories, incident magnitudes.
2432
2459
  *
2433
- * **Common Use Cases:**
2434
- * - Filtering POI categories (show only restaurants)
2435
- * - Hiding map layer groups (hide all except roads)
2436
- * - Filtering traffic incidents by type
2437
- * - Controlling road categories in traffic flow
2460
+ * @typeParam T - The type of values being filtered
2438
2461
  *
2439
2462
  * @example
2440
2463
  * ```typescript
2441
- * // Show only specific categories
2442
- * const includeFilter: ValuesFilter<string> = {
2443
- * show: 'only',
2444
- * values: ['RESTAURANT', 'CAFE', 'BAR']
2445
- * };
2464
+ * // Show only these categories
2465
+ * const includeFilter: ValuesFilter<string> = { show: 'only', values: ['RESTAURANT', 'CAFE', 'BAR'] };
2446
2466
  *
2447
- * // Hide specific categories
2448
- * const excludeFilter: ValuesFilter<string> = {
2449
- * show: 'all_except',
2450
- * values: ['PARKING_GARAGE']
2451
- * };
2452
- *
2453
- * // Type-safe with string literals
2454
- * type RoadType = 'motorway' | 'trunk' | 'primary';
2455
- * const roadFilter: ValuesFilter<RoadType> = {
2456
- * show: 'only',
2457
- * values: ['motorway', 'trunk']
2458
- * };
2467
+ * // Hide these categories
2468
+ * const excludeFilter: ValuesFilter<string> = { show: 'all-except', values: ['PARKING_GARAGE'] };
2459
2469
  * ```
2460
2470
  *
2461
2471
  * @group Shared
2462
2472
  */
2463
- type ValuesFilter<T> = {
2464
- /**
2465
- * Filter mode determining whether values list is inclusive or exclusive.
2466
- *
2467
- * @remarks
2468
- * - `only`: Shows only the items in the values array (whitelist)
2469
- * - `all_except`: Shows all items except those in the values array (blacklist)
2470
- */
2473
+ export type ValuesFilter<T> = {
2474
+ /** Whether `values` is the set to show or the set to hide. */
2471
2475
  show: FilterShowMode;
2472
- /**
2473
- * Array of values to include or exclude based on the show mode.
2474
- *
2475
- * @remarks
2476
- * The interpretation of this array depends on the `show` property:
2477
- * - If `show` is `'only'`, only these values will be visible
2478
- * - If `show` is `'all_except'`, these values will be hidden
2479
- *
2480
- * @example
2481
- * ```typescript
2482
- * // Include only these values
2483
- * values: ['RESTAURANT', 'HOTEL']
2484
- *
2485
- * // Exclude these values
2486
- * values: ['PARKING']
2487
- * ```
2488
- */
2476
+ /** The values to show or hide, depending on `show`. */
2489
2477
  values: T[];
2490
2478
  };
2491
2479
  //#endregion
@@ -2537,9 +2525,9 @@ type CustomImage<I extends string = string> = {
2537
2525
  *
2538
2526
  * This ID is used to reference the icon when styling map features.
2539
2527
  * The specific values depend on the context:
2540
- * - For POI categories: Use MapStylePOICategory values (e.g., 'RESTAURANT', 'HOTEL_MOTEL')
2528
+ * - For POI categories: Use MapStylePOICategory values (e.g., 'RESTAURANT', 'HOTEL_OR_MOTEL')
2541
2529
  * - For route waypoints: Use waypoint identifiers (e.g., 'waypoint-start', 'waypoint-end')
2542
- * - For charging stations: Use station type identifiers (e.g., 'ELECTRIC_VEHICLE_STATION')
2530
+ * - For charging stations: Use station type identifiers (e.g., 'CHARGING_LOCATION')
2543
2531
  * - For custom markers: Use any unique string identifier
2544
2532
  */
2545
2533
  id: I;
@@ -2607,12 +2595,12 @@ type CustomImage<I extends string = string> = {
2607
2595
  * // Define custom icons for both availability states
2608
2596
  * categoryIcons: [
2609
2597
  * {
2610
- * id: 'ELECTRIC_VEHICLE_STATION',
2598
+ * id: 'CHARGING_LOCATION',
2611
2599
  * image: greenChargingSVG,
2612
2600
  * availabilityLevel: 'available'
2613
2601
  * },
2614
2602
  * {
2615
- * id: 'ELECTRIC_VEHICLE_STATION',
2603
+ * id: 'CHARGING_LOCATION',
2616
2604
  * image: redChargingSVG,
2617
2605
  * availabilityLevel: 'occupied'
2618
2606
  * }
@@ -3092,14 +3080,20 @@ export declare class EventsProxy extends AbstractEventProxy {
3092
3080
  private hoveringFeatures?;
3093
3081
  private hoveringSourceWithLayers?;
3094
3082
  private longHoverTimeoutHandlerID?;
3083
+ private readonly recentHoverTimeouts;
3095
3084
  private firstDelayedHoverSinceMapMove;
3096
3085
  private lastClickedFeature?;
3097
3086
  private lastClickedSourceWithLayers?;
3098
3087
  private lastCursorStyle;
3099
3088
  private pendingMouseMove?;
3100
3089
  private mouseMoveFrameRequested;
3101
- private readonly config;
3090
+ private config;
3102
3091
  constructor(map: Map, config?: MapEventsConfig);
3092
+ /**
3093
+ * Merges `config` into the current configuration; what it leaves out, or sets `undefined`,
3094
+ * keeps its value. Timers already running keep the delay they started with.
3095
+ */
3096
+ updateConfig(config: MapEventsConfig): void;
3103
3097
  private listenToEvents;
3104
3098
  enable(enabled: boolean): void;
3105
3099
  private toPaddedBounds;
@@ -3145,6 +3139,8 @@ export declare class EventsProxy extends AbstractEventProxy {
3145
3139
  private dispatchHoverEnter;
3146
3140
  private dispatchHoverMove;
3147
3141
  private dispatchToHandlers;
3142
+ private hoverGracePeriodFor;
3143
+ private clearRecentHoverLater;
3148
3144
  private updateHoverCursor;
3149
3145
  private onMapClick;
3150
3146
  }
@@ -3844,8 +3840,7 @@ export declare abstract class AbstractMapModule<SOURCES_WITH_LAYERS extends Sour
3844
3840
  * module behavior even when the map's base style is modified.
3845
3841
  *
3846
3842
  * Unless a module documents otherwise, the given configuration **replaces** the current one
3847
- * rather than being merged into it. To change one part of it, spread the current
3848
- * configuration into the new one: `myModule.applyConfig({ ...myModule.getConfig(), theme })`.
3843
+ * rather than being merged into it. To change one part of it, use {@link updateConfig}.
3849
3844
  *
3850
3845
  * @example
3851
3846
  * ```typescript
@@ -3860,6 +3855,25 @@ export declare abstract class AbstractMapModule<SOURCES_WITH_LAYERS extends Sour
3860
3855
  * @see {@link getConfig} to retrieve the current configuration
3861
3856
  */
3862
3857
  applyConfig(config: CFG | undefined): void;
3858
+ /**
3859
+ * Changes part of the configuration and keeps the rest.
3860
+ *
3861
+ * The given properties are laid over the current configuration — one level deep, so a nested
3862
+ * object you pass replaces the nested object that was there — and the result is applied with
3863
+ * {@link applyConfig}. This is the same on every module, whatever its `applyConfig` does with a
3864
+ * whole configuration.
3865
+ *
3866
+ * @param partial - The properties to change.
3867
+ *
3868
+ * @example
3869
+ * ```typescript
3870
+ * routing.applyConfig({ displayUnits: 'imperial', theme: { mainColor: '#0a3653' } });
3871
+ * routing.updateConfig({ theme: { mainColor: '#c2185b' } }); // displayUnits stays imperial
3872
+ * ```
3873
+ *
3874
+ * @see {@link applyConfig} to apply a whole configuration
3875
+ */
3876
+ updateConfig(partial: Partial<NonNullable<CFG>>): void;
3863
3877
  /**
3864
3878
  * Emits a `config-change` event to all registered handlers.
3865
3879
  * Skipped during module initialisation to avoid spurious events.
@@ -4003,6 +4017,12 @@ export declare abstract class AbstractMapModule<SOURCES_WITH_LAYERS extends Sour
4003
4017
  * @ignore
4004
4018
  */
4005
4019
  protected userEvents<T = MapGeoJSONFeature, WHERE_SCOPE = never>(sourceNames: (keyof SOURCES_WITH_LAYERS)[], options?: EventScopeOptions<T, WHERE_SCOPE>): UserEvents<T, WHERE_SCOPE>;
4020
+ /**
4021
+ * `config-change` alone: the event surface of a module with no `show` and nothing on the map a
4022
+ * user can interact with, and the lifecycle half of {@link moduleEvents}.
4023
+ * @ignore
4024
+ */
4025
+ protected lifecycleEvents(): ModuleEvents<CFG, never>;
4006
4026
  /**
4007
4027
  * The event surface of a module with no `show`: user events over the named sources, plus
4008
4028
  * `config-change`. `shown-features` is not subscribable here — `TShown` is `never`, which
@@ -4065,10 +4085,10 @@ export declare abstract class AbstractDataOwnedMapModule<SOURCES_WITH_LAYERS ext
4065
4085
  //#region src/shared/AbstractStyleOwnedMapModule.d.ts
4066
4086
  /**
4067
4087
  * Base class for the map modules that control sources and layers the loaded map style already
4068
- * provides, under fixed global IDs: the base map, POIs, the traffic tiles and hillshade.
4088
+ * provides, under fixed global IDs: the base map, POIs, the traffic tiles and the terrain.
4069
4089
  *
4070
4090
  * @remarks
4071
- * The style owns the data, so such a module adds no sources of its own and shows nothing by
4091
+ * The style owns the data, so such a module brings no data of its own and shows nothing by
4072
4092
  * itself. It changes how the parts the style provides are drawn, filtered and made visible.
4073
4093
  * The SDK memoizes one instance per map, obtained with `get(map, config?)`, so every handle on it
4074
4094
  * sees the same state.
@@ -4090,9 +4110,8 @@ export declare abstract class AbstractStyleOwnedMapModule<SOURCES_WITH_LAYERS ex
4090
4110
  * The kind of value a display knob takes.
4091
4111
  *
4092
4112
  * @remarks
4093
- * One vocabulary for every knob catalogue in the SDK — map styling and any module that describes
4094
- * its display as knobs draw from the same set, so an agent that learned one catalogue can read the
4095
- * other.
4113
+ * One vocabulary for every knob catalogue in the SDK and its plugins, so a UI or an agent that
4114
+ * learned one catalogue can read the other.
4096
4115
  *
4097
4116
  * - `toggle`: `true`/`false`, e.g. whether an overlay is drawn.
4098
4117
  * - `factor`: a multiplier over what the style already does (`1` = unchanged).
@@ -4115,77 +4134,6 @@ export type KnobRange = {
4115
4134
  max: number;
4116
4135
  step?: number;
4117
4136
  };
4118
- /**
4119
- * A single, machine-readable description of one display knob.
4120
- *
4121
- * @remarks
4122
- * The point of describing knobs as data is that a caller — increasingly a coding agent rather than
4123
- * a person reading docs — can ask what a module actually exposes instead of guessing layer ids from
4124
- * training data. Three things follow from having it:
4125
- *
4126
- * - **ground before generating** — write against what the module exposes, not what you remember;
4127
- * - **validate** — ranges and allowed values arrive as data, so a bad value is caught before it
4128
- * is rendered;
4129
- * - **report and diff** — the paired settings object is plain and serializable, so a display change
4130
- * is reviewable in a pull request.
4131
- *
4132
- * A visual editor cannot do any of those: it cannot be read, diffed, or put in a pull request.
4133
- *
4134
- * Modules narrow this shape with their own descriptor type — e.g. `StylingKnobDescriptor` requires
4135
- * `available` and `appliesTo`, while a module whose knobs are always applicable omits them.
4136
- *
4137
- * @group Shared
4138
- */
4139
- export type KnobDescriptor<T = unknown> = {
4140
- /**
4141
- * Stable, dotted identifier, e.g. `labels.sizeFactor`. Treat these as public API: they are what
4142
- * a caller stores, diffs and passes back.
4143
- */
4144
- id: string;
4145
- /** What kind of value the knob takes. */
4146
- kind: KnobKind;
4147
- /** One-line description of what turning this knob does. */
4148
- description: string;
4149
- /** The value in force when nothing has been configured. */
4150
- default: T;
4151
- /** The value in force now. */
4152
- current: T;
4153
- /** Whether {@link KnobDescriptor.current} came from configuration rather than the default. */
4154
- overridden: boolean;
4155
- /** Inclusive bounds, for `factor` and `number` knobs. */
4156
- range?: KnobRange;
4157
- /** The allowed values, for `enum` knobs; the names accepted besides CSS colours, for `colors` knobs. */
4158
- options?: readonly string[];
4159
- /**
4160
- * Whether the knob has anything to work on in the loaded style. Omitted by modules whose knobs
4161
- * are always applicable; set to `false` by modules where a knob can be present in the catalogue
4162
- * but do nothing on the current style.
4163
- */
4164
- available?: boolean;
4165
- /**
4166
- * Which styles or contexts the knob works in. A string rather than a fixed union so each
4167
- * module can choose its own vocabulary — styling uses `'any-style' | 'tomtom-styles'`.
4168
- */
4169
- appliesTo?: string;
4170
- };
4171
- /**
4172
- * Builds one knob descriptor, working out `overridden` from whether a configured value was given.
4173
- * Pass `available` / `appliesTo` / `range` / `options` through `extra` when the module uses them.
4174
- * @ignore
4175
- */
4176
- export declare const knob: <T, ID extends string, KIND extends KnobKind, Extra extends object = Record<string, never>>(id: ID, kind: KIND, description: string, defaultValue: T, configured: T | undefined, extra?: Extra) => KnobDescriptor<T> & {
4177
- id: ID;
4178
- kind: KIND;
4179
- } & Extra;
4180
- /**
4181
- * Reduces a knob catalogue to a plain, serializable object of the values in force.
4182
- *
4183
- * @remarks
4184
- * Only knobs whose value was configured are included, so the result is a diff against the defaults
4185
- * rather than a dump of everything — which is what makes it reviewable.
4186
- * @ignore
4187
- */
4188
- export declare const knobSettings: (knobs: KnobDescriptor[]) => Record<string, unknown>;
4189
4137
  //#endregion
4190
4138
  //#region src/shared/layers/commonLayerProps.d.ts
4191
4139
  /**
@@ -4372,15 +4320,25 @@ type MapFont = (typeof mapFonts)[number];
4372
4320
  */
4373
4321
  export declare const POI_SOURCE_ID = "vectorTiles";
4374
4322
  /**
4375
- * Source identifier for hillshade terrain visualization.
4323
+ * Source identifier of the style's elevation data, added by the `hillshade` style part.
4376
4324
  *
4377
4325
  * @remarks
4378
- * References the raster source that provides terrain shading to visualize
4379
- * elevation and topography on the map.
4326
+ * A raster-dem source, drawn as the hillshade layer. {@link TerrainModule} raises the 3D surface
4327
+ * from a copy of it, {@link TERRAIN_SOURCE_ID}.
4380
4328
  *
4381
- * @group Hillshade
4329
+ * @group Terrain
4382
4330
  */
4383
4331
  export declare const HILLSHADE_SOURCE_ID = "hillshade";
4332
+ /**
4333
+ * Source identifier of the 3D terrain surface: a copy of {@link HILLSHADE_SOURCE_ID} that
4334
+ * {@link TerrainModule} adds when elevation is first enabled.
4335
+ *
4336
+ * @remarks
4337
+ * MapLibre renders hillshade and 3D terrain at a lower quality when both share one source.
4338
+ *
4339
+ * @group Terrain
4340
+ */
4341
+ export declare const TERRAIN_SOURCE_ID = "hillshade-terrain";
4384
4342
  /**
4385
4343
  * Source identifier for base map vector tiles.
4386
4344
  *
@@ -4418,7 +4376,7 @@ export declare const TRAFFIC_FLOW_SOURCE_ID = "vectorTilesFlow";
4418
4376
  *
4419
4377
  * Style-owned modules control sources and layers the map style already provides, under fixed
4420
4378
  * global IDs, so a second instance would be a second controller over one piece of shared state.
4421
- * Callers get the same instance instead — two components each asking for hillshade is reasonable
4379
+ * Callers get the same instance instead — two components each asking for the terrain is reasonable
4422
4380
  * code, and making them hoist a shared reference would be work pushed onto them for no benefit.
4423
4381
  *
4424
4382
  * @param map The map the module belongs to.
@@ -4710,8 +4668,12 @@ export type BaseMapEvents = CombinedEvents<MapGeoJSONFeature, BaseMapModuleConfi
4710
4668
  * buildings, labels, and other vector tile layers from the base map style.
4711
4669
  *
4712
4670
  * @remarks
4671
+ * **What this module owns:** whether each base-map layer group is shown. How the base map looks is
4672
+ * {@link StylingModule} knobs, whose `basemap.<group>` and `buildings.*` toggles switch the same groups.
4673
+ * See [Who owns what](https://docs.tomtom.com/maps-sdk-js/guides/map/modules#who-owns-what).
4674
+ *
4713
4675
  * **Managed Layers:**
4714
- * - Background and terrain
4676
+ * - Background and land cover
4715
4677
  * - Water bodies and coastlines
4716
4678
  * - Country and administrative borders
4717
4679
  * - Buildings (2D and 3D)
@@ -4722,7 +4684,7 @@ export type BaseMapEvents = CombinedEvents<MapGeoJSONFeature, BaseMapModuleConfi
4722
4684
  * **Does NOT Include:**
4723
4685
  * - Traffic flow/incidents (use {@link TrafficFlowModule} or {@link TrafficIncidentsModule})
4724
4686
  * - Points of Interest/POIs (use {@link POIsModule})
4725
- * - Hillshade/terrain shading (use {@link HillshadeModule})
4687
+ * - Hillshade and 3D terrain (use {@link TerrainModule})
4726
4688
  *
4727
4689
  * **Use Cases:**
4728
4690
  * - Toggle base map visibility on/off
@@ -6190,18 +6152,12 @@ export declare class GeometriesModule extends AbstractDataOwnedMapModule<Geometr
6190
6152
  * ```
6191
6153
  *
6192
6154
  * @example
6193
- * From search API response:
6155
+ * From a place's geometry:
6194
6156
  * ```typescript
6195
- * import { search } from '@tomtom-org/maps-sdk/services';
6196
- *
6197
- * const result = await search.geometrySearch({
6198
- * query: 'Amsterdam',
6199
- * geometryList: [{ type: 'CIRCLE', position: [52.37, 4.89], radius: 5000 }]
6200
- * });
6157
+ * import { geocodeOne, geometryData } from '@tomtom-org/maps-sdk/services';
6201
6158
  *
6202
- * if (result.results[0].dataSources?.geometry) {
6203
- * await geometries.show(result.results[0].dataSources.geometry);
6204
- * }
6159
+ * const amsterdam = await geocodeOne('Amsterdam');
6160
+ * await geometries.show(await geometryData({ geometries: [amsterdam] }));
6205
6161
  * ```
6206
6162
  */
6207
6163
  show(geometries: PolygonFeatures): Promise<void>;
@@ -6494,207 +6450,6 @@ export type ExtraGeometryDisplayProps = {
6494
6450
  */
6495
6451
  export type DisplayGeometryProps = CommonPlaceProps & ExtraGeometryDisplayProps;
6496
6452
  //#endregion
6497
- //#region src/hillshade/HillshadeModule.d.ts
6498
- /**
6499
- * IDs of sources and layers for hillshade module.
6500
- */
6501
- type HillshadeSourcesWithLayers = {
6502
- hillshade: StyleSourceWithLayers;
6503
- };
6504
- /**
6505
- * Map module for displaying terrain shading (hillshade).
6506
- *
6507
- * The HillshadeModule adds realistic terrain depth perception to the map by rendering
6508
- * shadow and highlight effects based on elevation data. This enhances the 3D appearance
6509
- * of mountainous and hilly terrain.
6510
- *
6511
- * @remarks
6512
- * **Features:**
6513
- * - Realistic terrain shading
6514
- * - Uses vector tile elevation data
6515
- * - Lightweight performance impact
6516
- * - Seamlessly integrates with other map layers
6517
- * - Toggle visibility on/off
6518
- *
6519
- * **Common Use Cases:**
6520
- * - Outdoor recreation maps (hiking, skiing)
6521
- * - Geographic/topographic applications
6522
- * - Environmental visualization
6523
- * - Landscape planning tools
6524
- *
6525
- * @example
6526
- * ```typescript
6527
- * // Create the module with hillshade visible
6528
- * const hillshade = await HillshadeModule.getInstance(map, {
6529
- * visible: true
6530
- * });
6531
- *
6532
- * // Toggle visibility
6533
- * hillshade.setVisible(false);
6534
- *
6535
- * // Listen to events
6536
- * hillshade.events.on('click', (feature, lngLat) => {
6537
- * console.log('Clicked hillshade at:', lngLat);
6538
- * });
6539
- * ```
6540
- *
6541
- * @see [Hillshade Guide](https://docs.tomtom.com/maps-sdk-js/guides/map/hillshade)
6542
- *
6543
- * @group Hillshade
6544
- */
6545
- export declare class HillshadeModule extends AbstractStyleOwnedMapModule<HillshadeSourcesWithLayers, HillshadeModuleConfig> {
6546
- /**
6547
- * Retrieves a HillshadeModule instance for the given map.
6548
- *
6549
- * @param map - The TomTomMap instance to attach this module to.
6550
- * @param config - Optional configuration for initialization and visibility.
6551
- *
6552
- * @returns A promise that resolves to the initialized HillshadeModule.
6553
- *
6554
- * @remarks
6555
- * **Configuration:**
6556
- * - `visible`: Initial visibility state
6557
- * - `ensureAddedToStyle`: Auto-add hillshade to style if missing
6558
- *
6559
- * **Style Requirement:**
6560
- * - Hillshade must be included in the map style or added via `ensureAddedToStyle`
6561
- * - Some styles may not support hillshade (e.g., satellite)
6562
- *
6563
- * @throws Error if hillshade source is not in style and `ensureAddedToStyle` is false
6564
- *
6565
- * @example
6566
- * Default initialization:
6567
- * ```typescript
6568
- * const hillshadeModule = await HillshadeModule.get(map);
6569
- * ```
6570
- *
6571
- * @example
6572
- * Auto-add to style if missing:
6573
- * ```typescript
6574
- * const hillshadeModule = await HillshadeModule.get(map, {
6575
- * visible: true
6576
- * });
6577
- * ```
6578
- *
6579
- * @example
6580
- * Start hidden:
6581
- * ```typescript
6582
- * const hillshadeModule = await HillshadeModule.get(map, {
6583
- * visible: false
6584
- * });
6585
- * ```
6586
- *
6587
- * @remarks
6588
- * **Instances:**
6589
- * `HillshadeModule` controls the hillshade source and layers the map style already provides,
6590
- * under fixed global IDs. Every instance is another handle on that same shared state, so
6591
- * visibility applied through one is visible through all of them.
6592
- */
6593
- static get(map: TomTomMap, config?: HillshadeModuleConfig): Promise<HillshadeModule>;
6594
- private constructor();
6595
- /**
6596
- * @ignore
6597
- */
6598
- protected _initSourcesWithLayers(): {
6599
- hillshade: StyleSourceWithLayers<import("maplibre-gl").SourceSpecification, import("maplibre-gl").Source>;
6600
- };
6601
- /**
6602
- * @ignore
6603
- */
6604
- protected _applyConfig(config: HillshadeModuleConfig | undefined): HillshadeModuleConfig | undefined;
6605
- /**
6606
- * Sets the visibility of the hillshade layer.
6607
- *
6608
- * @param visible - `true` to show hillshade, `false` to hide it.
6609
- *
6610
- * @remarks
6611
- * Changes are applied immediately if the map is ready.
6612
- *
6613
- * @example
6614
- * ```typescript
6615
- * hillshade.setVisible(true); // Show terrain shading
6616
- * hillshade.setVisible(false); // Hide terrain shading
6617
- * ```
6618
- */
6619
- setVisible(visible: boolean): void;
6620
- private _setVisible;
6621
- /**
6622
- * Checks if the hillshade layer is currently visible.
6623
- *
6624
- * @returns `true` if visible, `false` if hidden.
6625
- *
6626
- * @example
6627
- * ```typescript
6628
- * if (hillshade.isVisible()) {
6629
- * console.log('Terrain shading is active');
6630
- * }
6631
- * ```
6632
- */
6633
- isVisible(): boolean;
6634
- /**
6635
- * Gets the unified events interface for this module, covering both user interactions
6636
- * and module lifecycle events.
6637
- *
6638
- * **User interaction events** (`click`, `contextmenu`, `hover`, `long-hover`):
6639
- * ```typescript
6640
- * hillshade.events.on('click', (feature, lngLat) => {
6641
- * console.log('Clicked terrain at:', lngLat);
6642
- * });
6643
- * ```
6644
- *
6645
- * **Module lifecycle events** (`config-change`):
6646
- * ```typescript
6647
- * const unsub = hillshade.events.on('config-change', (config) => {
6648
- * console.log('Hillshade config changed:', config);
6649
- * });
6650
- * unsub();
6651
- * ```
6652
- */
6653
- get events(): CombinedEvents<import('maplibre-gl').MapGeoJSONFeature, HillshadeModuleConfig, never>;
6654
- }
6655
- //#endregion
6656
- //#region src/hillshade/types/hillshadeModuleConfig.d.ts
6657
- /**
6658
- * Configuration options for the HillshadeModule.
6659
- *
6660
- * Controls the appearance and visibility of terrain shading on the map.
6661
- *
6662
- * @remarks
6663
- * The HillshadeModule uses vector tile elevation data to create shadow/highlight
6664
- * effects that enhance the 3D perception of terrain features like mountains and valleys.
6665
- *
6666
- * **Configuration Options:**
6667
- * - `visible`: Whether the hillshade layer is shown or hidden
6668
- *
6669
- * **Visual Effect:**
6670
- * - Creates realistic terrain depth perception
6671
- * - Lightweight performance impact
6672
- * - Works alongside other map layers
6673
- *
6674
- * @example
6675
- * ```typescript
6676
- * // Show hillshade
6677
- * const config: HillshadeModuleConfig = {
6678
- * visible: true
6679
- * };
6680
- *
6681
- * // Hide hillshade initially
6682
- * const hiddenConfig: HillshadeModuleConfig = {
6683
- * visible: false
6684
- * };
6685
- * ```
6686
- *
6687
- * @group Hillshade
6688
- */
6689
- type HillshadeModuleConfig = MapModuleCommonConfig & {
6690
- /**
6691
- * Controls the visibility of the hillshade layers.
6692
- *
6693
- * @default false
6694
- */
6695
- visible?: boolean;
6696
- };
6697
- //#endregion
6698
6453
  //#region src/pois/util/poiCategoryMapping.d.ts
6699
6454
  /**
6700
6455
  * POI category mappings that have a direct equivalent in Map Display POI categories.
@@ -6892,20 +6647,59 @@ export type PlaceDisplayProps = {
6892
6647
  */
6893
6648
  export type DisplayPlaceProps = CommonPlaceProps & PlaceDisplayProps;
6894
6649
  //#endregion
6895
- //#region src/places/types/placesModuleConfig.d.ts
6650
+ //#region src/places/types/entryPointDisplay.d.ts
6896
6651
  /**
6897
- * Icon style options for displaying places on the map.
6652
+ * Properties of an entry point drawn by {@link PlacesModule}: the {@link EntryPoint} itself, whose
6653
+ * position is the feature geometry, plus where it came from.
6898
6654
  *
6899
- * @remarks
6900
- * **Available Styles:**
6901
- * - `pin`: Traditional map pin markers (teardrop shape)
6902
- * - `circle-icon`: Simple circular markers (previously named `circle`)
6903
- * - `base-map`: Mimics the map's built-in POI layer style with category icons (combines `main`, `selected`, and `micro` layers). For micro-only rendering, hide the `main` layer via `layers.main.layout.visibility = 'none'`.
6904
- * - `pin-clustered`: Same teardrop pins as `pin` for un-clustered places, with nearby
6905
- * places aggregated into a single icon. Single-category clusters render the matching
6906
- * base-map POI sprite with a small black count badge in the top-right; mixed-category
6907
- * clusters render a larger centred count circle in place of the icon. Cluster features
6908
- * expose `clusterBaseMapIconIDs` (comma-separated, deduplicated) on their properties.
6655
+ * @group Places
6656
+ */
6657
+ type PlaceEntryPointProps = Omit<EntryPoint, 'position'> & {
6658
+ /**
6659
+ * Unique identifier of the entry point feature, derived from its place.
6660
+ */
6661
+ id: string;
6662
+ /**
6663
+ * `id` of the place the entry point belongs to, as shown by the module.
6664
+ */
6665
+ placeID: string;
6666
+ /**
6667
+ * Index of the entry point in the `entryPoints` of its place.
6668
+ */
6669
+ entryPointIndex: number;
6670
+ } & SupportsEvents;
6671
+ /**
6672
+ * What `places.events.entryPoints` handlers receive: the entry point as a point feature, whether its
6673
+ * circle or its line was hit, together with the place it belongs to.
6674
+ *
6675
+ * @remarks
6676
+ * The place is passed as shown, with its own geometry. To route to the entrance, pass this feature
6677
+ * as the route location.
6678
+ *
6679
+ * @group Places
6680
+ */
6681
+ type PlaceEntryPointFeature = Feature<Point, PlaceEntryPointProps & {
6682
+ /**
6683
+ * The place the entry point belongs to. Absent only when that place left the map while the
6684
+ * event was being handled.
6685
+ */
6686
+ place?: Place<DisplayPlaceProps>;
6687
+ }>;
6688
+ //#endregion
6689
+ //#region src/places/types/placesModuleConfig.d.ts
6690
+ /**
6691
+ * Icon style options for displaying places on the map.
6692
+ *
6693
+ * @remarks
6694
+ * **Available Styles:**
6695
+ * - `pin`: Traditional map pin markers (teardrop shape)
6696
+ * - `circle-icon`: Simple circular markers (previously named `circle`)
6697
+ * - `base-map`: Mimics the map's built-in POI layer style with category icons (combines `main`, `selected`, and `micro` layers). For micro-only rendering, hide the `main` layer via `layers.main.layout.visibility = 'none'`.
6698
+ * - `pin-clustered`: Same teardrop pins as `pin` for un-clustered places, with nearby
6699
+ * places aggregated into a single icon. Single-category clusters render the matching
6700
+ * base-map POI sprite with a small black count badge in the top-right; mixed-category
6701
+ * clusters render a larger centred count circle in place of the icon. Cluster features
6702
+ * expose `clusterBaseMapIconIDs` (comma-separated, deduplicated) on their properties.
6909
6703
  *
6910
6704
  * @group Places
6911
6705
  */
@@ -6934,7 +6728,7 @@ export declare const placesThemes: readonly ["pin", "circle-icon", "base-map", "
6934
6728
  * const places = await PlacesModule.create(map, {
6935
6729
  * evAvailability: { enabled: true }
6936
6730
  * });
6937
- * const stations = await search({ poiCategories: ['ELECTRIC_VEHICLE_STATION'] });
6731
+ * const stations = await discoverPlaces({ poiCategories: ['CHARGING_LOCATION'] });
6938
6732
  * places.show(await getPlacesWithEVAvailability(stations));
6939
6733
  *
6940
6734
  * // Custom threshold and format
@@ -6950,7 +6744,7 @@ export declare const placesThemes: readonly ["pin", "circle-icon", "base-map", "
6950
6744
  * const places = await PlacesModule.create(map, {
6951
6745
  * icon: {
6952
6746
  * categoryIcons: [{
6953
- * id: 'ELECTRIC_VEHICLE_STATION',
6747
+ * id: 'CHARGING_LOCATION',
6954
6748
  * image: customEvIconSvg,
6955
6749
  * pixelRatio: 2
6956
6750
  * }]
@@ -7034,7 +6828,7 @@ type DefaultPlaceIconConfig = {
7034
6828
  * const iconConfig: PlaceIconConfig = {
7035
6829
  * categoryIcons: [
7036
6830
  * { category: 'RESTAURANT', image: '/icons/food.png', pixelRatio: 2 },
7037
- * { category: 'HOTEL_MOTEL', image: '/icons/hotel.png', pixelRatio: 2 }
6831
+ * { category: 'HOTEL_OR_MOTEL', image: '/icons/hotel.png', pixelRatio: 2 }
7038
6832
  * ]
7039
6833
  * };
7040
6834
  * ```
@@ -7449,6 +7243,81 @@ type PlaceConnectionsConfig = {
7449
7243
  */
7450
7244
  layers?: PlaceConnectionsLayersConfig;
7451
7245
  };
7246
+ /**
7247
+ * Which shown places get their entry points drawn.
7248
+ *
7249
+ * @remarks
7250
+ * - `all`: every place that has entry points.
7251
+ * - `selected`: hovered or clicked places, the ones the `selected` layer highlights. A
7252
+ * `recently-hovered` place counts too, so the pointer can cross the map to an entrance.
7253
+ * - `clicked`: clicked places, which stay clicked until the next click lands elsewhere.
7254
+ *
7255
+ * `selected` and `clicked` follow the module's event states, which exist once an event handler is
7256
+ * registered on the module or {@link PlacesModule.putEventState} is called. Hovering or clicking an
7257
+ * entry point keeps the entry points of its place drawn when a handler covers them: one on `events`
7258
+ * or `events.entryPoints`, not on `events.places` alone.
7259
+ *
7260
+ * @group Places
7261
+ */
7262
+ type PlaceEntryPointsShowFor = 'all' | 'selected' | 'clicked';
7263
+ /**
7264
+ * MapLibre layer customization for entry points.
7265
+ *
7266
+ * @remarks
7267
+ * The layer IDs are derived from the PlacesModule instance prefix:
7268
+ * - `point`: a circle on each entry point, larger for a `main` one than for the rest
7269
+ * - `line`: a dotted line from the place to each of its entry points
7270
+ *
7271
+ * @group Places
7272
+ */
7273
+ type PlaceEntryPointsLayersConfig = {
7274
+ /**
7275
+ * Entry point circle layer specification.
7276
+ */
7277
+ point?: Partial<ToBeAddedLayerSpecTemplate<CircleLayerSpecification>>;
7278
+ /**
7279
+ * Place-to-entry-point line layer specification.
7280
+ */
7281
+ line?: Partial<ToBeAddedLayerSpecTemplate<LineLayerSpecification>>;
7282
+ };
7283
+ /**
7284
+ * Configuration for drawing the entry points (entrances) of the shown places.
7285
+ *
7286
+ * @remarks
7287
+ * Draws `properties.entryPoints` of each place, whichever service returned it.
7288
+ *
7289
+ * @example
7290
+ * ```typescript
7291
+ * const places = await PlacesModule.create(map, {
7292
+ * entryPoints: { showFor: 'clicked', minZoom: 16 }
7293
+ * });
7294
+ * // The handler is what makes places clickable, and so what lets them reach the `click` state.
7295
+ * places.events.on('click', (feature) => console.log(feature.properties.title));
7296
+ * ```
7297
+ *
7298
+ * @group Places
7299
+ */
7300
+ type PlaceEntryPointsConfig = {
7301
+ /**
7302
+ * Which places get their entry points drawn.
7303
+ *
7304
+ * @default 'selected'
7305
+ */
7306
+ showFor?: PlaceEntryPointsShowFor;
7307
+ /**
7308
+ * Zoom level below which no entry point is drawn.
7309
+ *
7310
+ * @remarks
7311
+ * Under the `pin-clustered` theme it is never lower than 18, the first zoom without clusters.
7312
+ *
7313
+ * @default 15
7314
+ */
7315
+ minZoom?: number;
7316
+ /**
7317
+ * Custom MapLibre layer specifications for the entry point circles and lines.
7318
+ */
7319
+ layers?: PlaceEntryPointsLayersConfig;
7320
+ };
7452
7321
  /**
7453
7322
  * Configuration options for the PlacesModule.
7454
7323
  *
@@ -7543,6 +7412,13 @@ type PlacesModuleConfig<P extends CommonPlaceProps = CommonPlaceProps> = MapModu
7543
7412
  * (a dashed line) and no label.
7544
7413
  */
7545
7414
  connections?: PlaceConnectionsConfig;
7415
+ /**
7416
+ * Configuration for drawing the entry points of the shown places.
7417
+ *
7418
+ * @remarks
7419
+ * When omitted, entry points are not drawn.
7420
+ */
7421
+ entryPoints?: PlaceEntryPointsConfig;
7546
7422
  /**
7547
7423
  * Additional properties to compute for each place feature.
7548
7424
  *
@@ -7611,6 +7487,14 @@ type ConnectionFeatureProps = {
7611
7487
  */
7612
7488
  type ConnectionFeatureCollection = FeatureCollection<LineString, ConnectionFeatureProps>;
7613
7489
  //#endregion
7490
+ //#region src/places/utils/prepareEntryPointsForDisplay.d.ts
7491
+ /**
7492
+ * Each entry point is two features sharing one id: its circle, then its line. The circle comes
7493
+ * first, so an id lookup (event states, event payloads) always lands on it.
7494
+ * @ignore
7495
+ */
7496
+ type EntryPointFeatureCollection = FeatureCollection<Point | LineString, PlaceEntryPointProps>;
7497
+ //#endregion
7614
7498
  //#region src/places/PlacesModule.d.ts
7615
7499
  type PlacesSourcesAndLayers = {
7616
7500
  /**
@@ -7632,6 +7516,10 @@ type PlacesSourcesAndLayers = {
7632
7516
  * Connections source id with corresponding layers ids (line + label).
7633
7517
  */
7634
7518
  connections: GeoJSONSourceWithLayers<ConnectionFeatureCollection>;
7519
+ /**
7520
+ * Entry points source id with corresponding layers ids (line + point).
7521
+ */
7522
+ entryPoints: GeoJSONSourceWithLayers<EntryPointFeatureCollection>;
7635
7523
  };
7636
7524
  /**
7637
7525
  * What {@link PlacesModule.show} accepts, and what `shown-features` handlers receive back.
@@ -7661,14 +7549,19 @@ export type PlacesEvents = CombinedEvents<MapGeoJSONFeature, PlacesModuleConfig,
7661
7549
  places: UserEvents<Place<DisplayPlaceProps>>;
7662
7550
  /** The lines and labels connecting places to their parent, when connections are shown. */
7663
7551
  connections: UserEvents<MapGeoJSONFeature>;
7552
+ /** The entry points of places, when {@link PlacesModuleConfig.entryPoints} draws them. */
7553
+ entryPoints: UserEvents<PlaceEntryPointFeature>;
7664
7554
  };
7665
7555
  export declare class PlacesModule extends AbstractDataOwnedMapModule<PlacesSourcesAndLayers, PlacesModuleConfig> {
7666
7556
  private layerSpecs;
7667
7557
  private connectionLayerSpecs;
7558
+ private entryPointLayerSpecs;
7559
+ private refreshingEntryPoints;
7668
7560
  private currentClusterMode;
7669
7561
  private sourceID;
7670
7562
  private unclusteredSourceID;
7671
7563
  private connectionSourceID;
7564
+ private entryPointSourceID;
7672
7565
  private layerIDPrefix;
7673
7566
  private defaultPlaceIconID;
7674
7567
  private shownConnections;
@@ -7690,10 +7583,13 @@ export declare class PlacesModule extends AbstractDataOwnedMapModule<PlacesSourc
7690
7583
  * @ignore
7691
7584
  */
7692
7585
  protected _initSourcesWithLayers(config?: PlacesModuleConfig, restore?: boolean): PlacesSourcesAndLayers;
7586
+ private addOverlaySource;
7587
+ private replaceLayerSpecs;
7693
7588
  private partitionSpecsForSources;
7694
7589
  private buildLayerSpecs;
7695
7590
  private buildClusterOptions;
7696
7591
  private buildConnectionLayerSpecs;
7592
+ private buildEntryPointLayerSpecs;
7697
7593
  /**
7698
7594
  * @ignore
7699
7595
  */
@@ -7798,8 +7694,9 @@ export declare class PlacesModule extends AbstractDataOwnedMapModule<PlacesSourc
7798
7694
  applyExtraFeatureProps<P extends CommonPlaceProps = CommonPlaceProps>(extraFeatureProps: NonNullable<PlacesModuleConfig<P>['extraFeatureProps']>): void;
7799
7695
  private updateLayersAndData;
7800
7696
  private rebuildSourcesAndLayers;
7801
- private updateConnectionLayersAndData;
7802
7697
  private updateConnectionsData;
7698
+ private updateEntryPointsData;
7699
+ private applyLayersVisibility;
7803
7700
  private applyPlacesVisibility;
7804
7701
  private setupImages;
7805
7702
  private updateData;
@@ -7824,9 +7721,9 @@ export declare class PlacesModule extends AbstractDataOwnedMapModule<PlacesSourc
7824
7721
  * @example
7825
7722
  * Display search results:
7826
7723
  * ```typescript
7827
- * import { search } from '@tomtom-org/maps-sdk/services';
7724
+ * import { discoverPlaces } from '@tomtom-org/maps-sdk/services';
7828
7725
  *
7829
- * const results = await search({ query: 'coffee' });
7726
+ * const results = await discoverPlaces({ query: 'coffee' });
7830
7727
  * await placesModule.show(results);
7831
7728
  * ```
7832
7729
  *
@@ -8140,13 +8037,13 @@ export type POICategoryGroup = keyof typeof poiCategoryGroups;
8140
8037
  /**
8141
8038
  * A POI classification or group that can be filtered.
8142
8039
  *
8143
- * Can be either a specific POI category (like RESTAURANT, HOTEL_MOTEL) or a
8040
+ * Can be either a specific POI category (like RESTAURANT, HOTEL_OR_MOTEL) or a
8144
8041
  * broader category group (like FOOD_DRINKS_GROUP, SHOPPING_GROUP) that contains
8145
8042
  * multiple related categories.
8146
8043
  *
8147
8044
  * @remarks
8148
8045
  * **Category vs Group:**
8149
- * - Category: Specific POI type (e.g., RESTAURANT, GAS_STATION)
8046
+ * - Category: Specific POI type (e.g., RESTAURANT, FUEL_STATION)
8150
8047
  * - Group: Collection of related categories (e.g., FOOD_DRINKS_GROUP includes restaurants, cafes, bars)
8151
8048
  *
8152
8049
  * Using groups is more convenient when you want to filter multiple related categories at once.
@@ -8193,7 +8090,7 @@ type FilterablePOICategory = MapStylePOICategory | POICategoryGroup;
8193
8090
  * const noParkingConfig: POIsModuleConfig = {
8194
8091
  * filters: {
8195
8092
  * categories: {
8196
- * show: 'all_except',
8093
+ * show: 'all-except',
8197
8094
  * values: ['PARKING_GROUP']
8198
8095
  * }
8199
8096
  * }
@@ -8227,25 +8124,20 @@ type POIsModuleConfig = MapModuleCommonConfig & {
8227
8124
  */
8228
8125
  filters?: {
8229
8126
  /**
8230
- * Category filter configuration.
8231
- *
8232
- * @remarks
8233
- * By default, all categories are included in the map.
8234
- * - Use `all_except` show mode to hide some categories/groups
8235
- * - Use `only` mode to show only specific categories/groups and hide everything else
8127
+ * Categories or category groups to show or hide, per {@link FilterShowMode}.
8236
8128
  *
8237
8129
  * @example
8238
8130
  * ```typescript
8239
8131
  * // Show only restaurants and hotels
8240
8132
  * categories: {
8241
8133
  * show: 'only',
8242
- * values: ['RESTAURANT', 'HOTEL_MOTEL']
8134
+ * values: ['RESTAURANT', 'HOTEL_OR_MOTEL']
8243
8135
  * }
8244
8136
  *
8245
8137
  * // Hide parking
8246
8138
  * categories: {
8247
- * show: 'all_except',
8248
- * values: ['PARKING_GARAGE', 'OPEN_PARKING_AREA']
8139
+ * show: 'all-except',
8140
+ * values: ['PARKING_GARAGE', 'OPEN_CAR_PARKING_AREA']
8249
8141
  * }
8250
8142
  *
8251
8143
  * // Show only food-related POIs
@@ -8308,7 +8200,7 @@ type POIsModuleFeature = Feature<Point, {
8308
8200
  *
8309
8201
  * @remarks
8310
8202
  * Used for styling and filtering purposes. Maps to a specific POI type
8311
- * (e.g., RESTAURANT, HOTEL_MOTEL).
8203
+ * (e.g., RESTAURANT, HOTEL_OR_MOTEL).
8312
8204
  *
8313
8205
  * @example 'restaurant'
8314
8206
  */
@@ -8360,6 +8252,10 @@ type PoIsSourcesAndLayers = {
8360
8252
  * and include businesses, landmarks, and other points of interest.
8361
8253
  *
8362
8254
  * @remarks
8255
+ * **What this module owns:** whether the style's POIs are shown, and which categories. Their size,
8256
+ * label colours and zoom thresholds are `pois.*` knobs on {@link StylingModule}.
8257
+ * See [Who owns what](https://docs.tomtom.com/maps-sdk-js/guides/map/modules#who-owns-what).
8258
+ *
8363
8259
  * **Features:**
8364
8260
  * - Toggle POI visibility on/off
8365
8261
  * - Filter by POI categories or category groups
@@ -8367,7 +8263,7 @@ type PoIsSourcesAndLayers = {
8367
8263
  * - Based on vector tile data in the map style
8368
8264
  *
8369
8265
  * **POI Categories:**
8370
- * - Individual categories (e.g., RESTAURANT, HOTEL_MOTEL, PARKING_GARAGE)
8266
+ * - Individual categories (e.g., RESTAURANT, HOTEL_OR_MOTEL, PARKING_GARAGE)
8371
8267
  * - Category groups (e.g., FOOD_DRINKS_GROUP, SHOPPING_GROUP, TRANSPORTATION_GROUP)
8372
8268
  *
8373
8269
  * **Difference from PlacesModule:**
@@ -8393,13 +8289,13 @@ type PoIsSourcesAndLayers = {
8393
8289
  * // Show only restaurants and hotels
8394
8290
  * poisModule.filterCategories({
8395
8291
  * show: 'only',
8396
- * values: ['RESTAURANT', 'HOTEL_MOTEL']
8292
+ * values: ['RESTAURANT', 'HOTEL_OR_MOTEL']
8397
8293
  * });
8398
8294
  *
8399
8295
  * // Hide parking garages
8400
8296
  * poisModule.filterCategories({
8401
- * show: 'all_except',
8402
- * values: ['PARKING_GARAGE', 'OPEN_PARKING_AREA']
8297
+ * show: 'all-except',
8298
+ * values: ['PARKING_GARAGE', 'OPEN_CAR_PARKING_AREA']
8403
8299
  * });
8404
8300
  * ```
8405
8301
  *
@@ -8414,7 +8310,7 @@ type PoIsSourcesAndLayers = {
8414
8310
  *
8415
8311
  * // Hide transportation POIs
8416
8312
  * pois.filterCategories({
8417
- * show: 'all_except',
8313
+ * show: 'all-except',
8418
8314
  * values: ['TRANSPORTATION_GROUP']
8419
8315
  * });
8420
8316
  * ```
@@ -8519,32 +8415,8 @@ export declare class POIsModule extends AbstractStyleOwnedMapModule<PoIsSourcesA
8519
8415
  /**
8520
8416
  * Filters POIs by category or category group.
8521
8417
  *
8522
- * @param categoriesFilter - Filter configuration specifying which categories to show/hide.
8523
- * Pass `undefined` to reset to default (show all).
8524
- *
8525
- * @remarks
8526
- * **Filter Modes:**
8527
- * - `only`: Show only the specified categories, hide all others
8528
- * - `all_except`: Show all categories except the specified ones
8529
- *
8530
- * **Category Types:**
8531
- * - Individual categories (e.g., 'RESTAURANT', 'HOTEL_MOTEL')
8532
- * - Category groups (e.g., 'FOOD_DRINKS_GROUP', 'SHOPPING_GROUP')
8533
- *
8534
- * **Available Category Groups:**
8535
- * - FOOD_DRINKS_GROUP
8536
- * - SHOPPING_GROUP
8537
- * - TRANSPORTATION_GROUP
8538
- * - HEALTH_GROUP
8539
- * - PARKING_GROUP
8540
- * - HOLIDAY_TOURISM_GROUP
8541
- * - EV_CHARGING_STATIONS_GROUP
8542
- * - GAS_STATIONS_GROUP
8543
- * - ACCOMMODATION_GROUP
8544
- * - ENTERTAINMENT_GROUP
8545
- * - SPORTS_LEISURE_GROUP
8546
- * - EDUCATION_GROUP
8547
- * - GOVERNMENT_GROUP
8418
+ * @param categoriesFilter - Categories (`'RESTAURANT'`) or {@link POICategoryGroup | groups}
8419
+ * (`'FOOD_DRINKS_GROUP'`) to show or hide, per {@link FilterShowMode}. `undefined` shows all.
8548
8420
  *
8549
8421
  * @example
8550
8422
  * Show only restaurants:
@@ -8559,7 +8431,7 @@ export declare class POIsModule extends AbstractStyleOwnedMapModule<PoIsSourcesA
8559
8431
  * Hide parking:
8560
8432
  * ```typescript
8561
8433
  * pois.filterCategories({
8562
- * show: 'all_except',
8434
+ * show: 'all-except',
8563
8435
  * values: ['PARKING_GROUP']
8564
8436
  * });
8565
8437
  * ```
@@ -9449,13 +9321,13 @@ type SectionIconConfig = {
9449
9321
  * - `center`: one icon at the middle of each section.
9450
9322
  * - `along`: icons repeated along the section.
9451
9323
  *
9452
- * @defaultValue `"center"`
9324
+ * @defaultValue `"center"` on the generated types; `ferry` and `tollRoad` keep their own placement.
9453
9325
  */
9454
9326
  placement?: 'center' | 'along';
9455
9327
  /**
9456
9328
  * Icon scale, where `1` is the sprite image's own size.
9457
9329
  *
9458
- * @defaultValue 1
9330
+ * @defaultValue `1` on the generated types; `ferry` and `tollRoad` keep their own zoom-ramped size.
9459
9331
  */
9460
9332
  size?: number;
9461
9333
  };
@@ -11197,13 +11069,20 @@ type LayerSelector = {
11197
11069
  /** The layer id must contain none of these fragments (case-insensitive). */
11198
11070
  idExcludes?: string[];
11199
11071
  };
11072
+ /**
11073
+ * The style's sources, for selectors that constrain the source type.
11074
+ * @ignore
11075
+ */
11076
+ type StyleSources = Record<string, {
11077
+ type: string;
11078
+ }>;
11200
11079
  //#endregion
11201
11080
  //#region src/styling/mapColorCatalogue.d.ts
11202
11081
  /**
11203
- * The ten semantic map colours — TomTom Map Maker's *Foundations* palette, under its own names and
11204
- * in its own order. One name drives every layer and shade the style derives from it.
11082
+ * The ten semantic map colours — the *Foundations* palette of TomTom's style themes, under their own
11083
+ * names and in their order. One name drives every layer and shade the style derives from it.
11205
11084
  *
11206
- * | Name | Map Maker | Reaches |
11085
+ * | Name | Theme label | Reaches |
11207
11086
  * |---|---|---|
11208
11087
  * | `land` | Land (base) | Map background and other bare-land features, influences admin borders/labels. Also used to derive all map colours if undefined. |
11209
11088
  * | `water` | Water | Waterbodies, waterways and other water features. Also influences glaciers, water labels and ferry lines. |
@@ -11236,11 +11115,11 @@ type MapColors = Partial<Record<MapColorName, string>>;
11236
11115
  * `StylingModule` needs the set at runtime to pick MapLibre's paint setter over its layout one.
11237
11116
  * @ignore
11238
11117
  */
11239
- declare const paintColorProperties: readonly ["fill-color", "fill-outline-color", "line-color", "text-color", "text-halo-color", "fill-extrusion-color", "background-color"];
11118
+ declare const paintColorProperties: readonly ["fill-color", "fill-outline-color", "line-color", "text-color", "text-halo-color", "fill-extrusion-color", "background-color", "hillshade-shadow-color", "hillshade-highlight-color", "hillshade-accent-color"];
11240
11119
  /** @ignore */
11241
11120
  type PaintColorProperty = (typeof paintColorProperties)[number];
11242
11121
  /**
11243
- * The ten map colour names, in Map Maker's Foundations order.
11122
+ * The ten map colour names, in the themes' Foundations order.
11244
11123
  *
11245
11124
  * @group Map Styling
11246
11125
  */
@@ -11309,15 +11188,6 @@ declare const stylingPresets: {
11309
11188
  readonly 'view.sky': true;
11310
11189
  };
11311
11190
  };
11312
- readonly terrain: {
11313
- readonly name: "Terrain";
11314
- readonly description: "3D terrain with a sky for tilted views. Needs the hillshade style part and a pitched camera.";
11315
- readonly settings: {
11316
- readonly 'view.terrain': true;
11317
- readonly 'view.terrainExaggeration': 1.2;
11318
- readonly 'view.sky': true;
11319
- };
11320
- };
11321
11191
  };
11322
11192
  /**
11323
11193
  * The id of a styling preset, as accepted by {@link StylingModule.applyPreset}.
@@ -11331,6 +11201,13 @@ type StylingPresetId = keyof typeof stylingPresets;
11331
11201
  * @group Map Styling
11332
11202
  */
11333
11203
  export declare const stylingPresetIds: StylingPresetId[];
11204
+ /**
11205
+ * Every styling preset with its name, use case and the knob values it applies, in catalogue order.
11206
+ * Static data: no map is needed to read it.
11207
+ *
11208
+ * @group Map Styling
11209
+ */
11210
+ export declare const stylingPresetCatalogue: readonly StylingPreset[];
11334
11211
  //#endregion
11335
11212
  //#region src/styling/types/stylingTypes.d.ts
11336
11213
  /**
@@ -11379,58 +11256,31 @@ type StylingKnobRange = KnobRange & {
11379
11256
  step: number;
11380
11257
  };
11381
11258
  /**
11382
- * One entry of the styling catalogue returned by {@link StylingModule.describe}: everything a UI or
11383
- * an agent needs to offer the knob, validate a value for it and show its state.
11384
- *
11385
- * @remarks
11386
- * Narrows the shared {@link KnobDescriptor}: styling ids and value types are known, `range.step` is
11387
- * always given, and `available` / `appliesTo` are required — every styling knob answers both.
11259
+ * One entry of {@link stylingKnobCatalogue}: what a UI or a coding agent needs to offer the knob and
11260
+ * validate a value for it, with no map loaded. The value in force is {@link StylingModule.get}.
11388
11261
  *
11389
11262
  * @group Map Styling
11390
11263
  */
11391
- type StylingKnobDescriptor = KnobDescriptor & {
11264
+ type StylingKnob = {
11392
11265
  /** The knob's id, as accepted by {@link StylingModule.set}. */
11393
11266
  id: StylingKnobId;
11394
11267
  kind: StylingKnobKind;
11395
- /**
11396
- * The value the loaded style ships with. `undefined` when the style defines it as a data-driven
11397
- * expression that no single value stands for; `reset` still restores it exactly.
11398
- */
11399
- default: StylingKnobValue | undefined;
11400
- /** The value in effect right now: the override if there is one, otherwise the default. */
11401
- current: StylingKnobValue | undefined;
11268
+ /** One line on what turning the knob does. */
11269
+ description: string;
11402
11270
  /** The range of valid values, for `factor` and `number` knobs. */
11403
11271
  range?: StylingKnobRange;
11404
11272
  /** The valid values, for `enum` knobs. */
11405
11273
  options?: readonly string[];
11406
- /**
11407
- * Whether the knob has anything to work on in the loaded style. `false` means setting it would
11408
- * do nothing, and the SDK also warns once in the console when that happens. Check this before
11409
- * offering the knob in a UI or to an agent. Map-level knobs are always available bar
11410
- * `view.terrain`, which needs the style to carry an elevation source.
11411
- */
11412
- available: boolean;
11413
11274
  /** Which styles the knob works on; see {@link stylingKnobAppliesTo}. */
11414
11275
  appliesTo: StylingKnobAppliesTo;
11415
11276
  };
11416
- /**
11417
- * The machine-readable styling catalogue: what can be styled on the loaded style, with defaults,
11418
- * ranges and current values. Additive across SDK minor versions; knob ids are public API.
11419
- *
11420
- * @group Map Styling
11421
- */
11422
- type StylingCatalogue = {
11423
- knobs: StylingKnobDescriptor[];
11424
- /** The presets {@link StylingModule.applyPreset} accepts, with the settings each one applies. */
11425
- presets: StylingPresetDescriptor[];
11426
- };
11427
11277
  /**
11428
11278
  * A named bundle of knob settings — TomTom's cartographic opinions, in code. Apply one with
11429
11279
  * {@link StylingModule.applyPreset}.
11430
11280
  *
11431
11281
  * @group Map Styling
11432
11282
  */
11433
- type StylingPresetDescriptor = {
11283
+ type StylingPreset = {
11434
11284
  id: StylingPresetId;
11435
11285
  name: string;
11436
11286
  /** One line on the use case the preset serves. */
@@ -11461,7 +11311,15 @@ type StylingSettings = MapModuleCommonConfig & { [K in StylingKnobId]?: StylingK
11461
11311
  /** @ignore */
11462
11312
  type ScalableProperty = 'text-size' | 'icon-size' | 'line-width';
11463
11313
  /** @ignore */
11464
- type ColorProperty = Extract<PaintColorProperty, 'line-color' | 'text-color' | 'text-halo-color'>;
11314
+ type ColorProperty = Extract<PaintColorProperty, 'line-color' | 'text-color' | 'text-halo-color' | 'hillshade-shadow-color' | 'hillshade-highlight-color' | 'hillshade-accent-color'>;
11315
+ /**
11316
+ * Paint properties set as plain literals by the `paintLiteral` mechanism. Listed as values for the
11317
+ * same reason as `paintColorProperties`.
11318
+ * @ignore
11319
+ */
11320
+ declare const literalPaintProperties: readonly ["hillshade-method", "hillshade-illumination-direction", "hillshade-exaggeration"];
11321
+ /** @ignore */
11322
+ type LiteralProperty = (typeof literalPaintProperties)[number];
11465
11323
  /**
11466
11324
  * How a knob reaches the style. A knob may use several (e.g. text and icon size together).
11467
11325
  * @ignore
@@ -11493,6 +11351,17 @@ type KnobMechanism =
11493
11351
  type: 'minZoom';
11494
11352
  layers: LayerSelector[];
11495
11353
  } |
11354
+ /** Sets the maximum zoom of the matched layers. */
11355
+ {
11356
+ type: 'maxZoom';
11357
+ layers: LayerSelector[];
11358
+ } |
11359
+ /** M2 — sets a paint property to the knob's value as a plain literal on the matched layers. */
11360
+ {
11361
+ type: 'paintLiteral';
11362
+ property: LiteralProperty;
11363
+ layers: LayerSelector[];
11364
+ } |
11496
11365
  /** Shifts the `["-", ["zoom"], offset]` density term inside the matched layers' filters. */
11497
11366
  {
11498
11367
  type: 'zoomOffset';
@@ -11506,10 +11375,6 @@ type KnobMechanism =
11506
11375
  {
11507
11376
  type: 'sky';
11508
11377
  } |
11509
- /** Map-level: 3D terrain from the style's raster-dem source (exaggeration from the sibling knob). */
11510
- {
11511
- type: 'terrain';
11512
- } |
11513
11378
  /** Map-level: the colour behind the map canvas, which a globe leaves visible around the planet. */
11514
11379
  {
11515
11380
  type: 'space';
@@ -11538,11 +11403,126 @@ type KnobDefinitionOf<KIND extends StylingKnobKind> = KnobDefinition & {
11538
11403
  /**
11539
11404
  * The styling knob catalogue: what the SDK can restyle on a TomTom standard style, and how.
11540
11405
  *
11541
- * Ids are public API — additive only. Ranges follow TomTom Map Maker's validated grammar (factors
11406
+ * Ids are public API — additive only. Ranges follow the validated grammar of TomTom's style editor (factors
11542
11407
  * 0.5–1.5 in 0.1 steps) so a value that looks right in the designer's tool looks right here.
11543
11408
  * @ignore
11544
11409
  */
11545
11410
  declare const knobDefinitions: {
11411
+ readonly 'hillshade.method': {
11412
+ readonly kind: "enum";
11413
+ readonly description: "How the relief is shaded: standard (one light), basic, igor (softer), combined, or multidirectional (four lights).";
11414
+ readonly options: readonly ["standard", "basic", "igor", "combined", "multidirectional"];
11415
+ readonly appliesTo: "tomtom-styles";
11416
+ readonly mechanisms: [{
11417
+ readonly type: "paintLiteral";
11418
+ readonly property: "hillshade-method";
11419
+ readonly layers: [LayerSelector];
11420
+ }];
11421
+ };
11422
+ readonly 'hillshade.lightDirection': {
11423
+ readonly kind: "number";
11424
+ readonly description: "Direction the light comes from, in degrees clockwise from north (335 is the cartographic default).";
11425
+ readonly range: {
11426
+ readonly min: 0;
11427
+ readonly max: 359;
11428
+ readonly step: 1;
11429
+ };
11430
+ readonly appliesTo: "tomtom-styles";
11431
+ readonly mechanisms: [{
11432
+ readonly type: "paintLiteral";
11433
+ readonly property: "hillshade-illumination-direction";
11434
+ readonly layers: [LayerSelector];
11435
+ }];
11436
+ };
11437
+ readonly 'hillshade.exaggeration': {
11438
+ readonly kind: "number";
11439
+ readonly description: "Strength of the shading (0 = flat). The standard styles ramp it to zero by zoom 13; setting it replaces the ramp with a constant.";
11440
+ readonly range: {
11441
+ readonly min: 0;
11442
+ readonly max: 1;
11443
+ readonly step: 0.05;
11444
+ };
11445
+ readonly appliesTo: "tomtom-styles";
11446
+ readonly mechanisms: [{
11447
+ readonly type: "paintLiteral";
11448
+ readonly property: "hillshade-exaggeration";
11449
+ readonly layers: [LayerSelector];
11450
+ }];
11451
+ };
11452
+ readonly 'hillshade.maxZoom': {
11453
+ readonly kind: "number";
11454
+ readonly description: "Zoom level up to which the shading is drawn (the standard styles stop at 13; 22 keeps it at every zoom).";
11455
+ readonly range: {
11456
+ readonly min: 10;
11457
+ readonly max: 22;
11458
+ readonly step: 1;
11459
+ };
11460
+ readonly appliesTo: "tomtom-styles";
11461
+ readonly mechanisms: [{
11462
+ readonly type: "maxZoom";
11463
+ readonly layers: [LayerSelector];
11464
+ }];
11465
+ };
11466
+ readonly 'hillshade.shadowColor': KnobDefinitionOf<"color">;
11467
+ readonly 'hillshade.highlightColor': KnobDefinitionOf<"color">;
11468
+ readonly 'hillshade.accentColor': KnobDefinitionOf<"color">;
11469
+ readonly 'view.projection': {
11470
+ readonly kind: "enum";
11471
+ readonly description: "How the map is drawn: flat Mercator or a globe. The globe flattens to Mercator between zoom 11 and 12 by design.";
11472
+ readonly options: readonly ["mercator", "globe"];
11473
+ readonly appliesTo: "any-style";
11474
+ readonly mechanisms: [{
11475
+ readonly type: "projection";
11476
+ }];
11477
+ };
11478
+ readonly 'view.sky': {
11479
+ readonly kind: "toggle";
11480
+ readonly description: "A sky with atmosphere behind the globe and above a tilted flat map. Without it MapLibre draws a fully transparent sky, so a globe arrives with no atmosphere.";
11481
+ readonly appliesTo: "any-style";
11482
+ readonly mechanisms: [{
11483
+ readonly type: "sky";
11484
+ }];
11485
+ };
11486
+ readonly 'view.skyColor': {
11487
+ readonly kind: "color";
11488
+ readonly description: "Colour of the sky (and of the atmosphere halo around the globe). Defaults to a daylit blue on a light style and a night blue on a dark one.";
11489
+ readonly appliesTo: "any-style";
11490
+ readonly mechanisms: [{
11491
+ readonly type: "sky";
11492
+ }];
11493
+ };
11494
+ readonly 'view.horizonColor': {
11495
+ readonly kind: "color";
11496
+ readonly description: "Colour of the sky at the horizon. Defaults with the style theme, so a dark map gets a dim horizon rather than a white one.";
11497
+ readonly appliesTo: "any-style";
11498
+ readonly mechanisms: [{
11499
+ readonly type: "sky";
11500
+ }];
11501
+ };
11502
+ readonly 'view.spaceColor': {
11503
+ readonly kind: "color";
11504
+ readonly description: "Colour behind the map, which a globe leaves visible around the planet. The map canvas is transparent, so without this the page background shows through. Defaults with the style theme: white on a light style, near-black on a dark one.";
11505
+ readonly appliesTo: "any-style";
11506
+ readonly mechanisms: [{
11507
+ readonly type: "space";
11508
+ }];
11509
+ };
11510
+ readonly "basemap.land": KnobDefinitionOf<"toggle">;
11511
+ readonly "basemap.water": KnobDefinitionOf<"toggle">;
11512
+ readonly "basemap.roads": KnobDefinitionOf<"toggle">;
11513
+ readonly "basemap.railways": KnobDefinitionOf<"toggle">;
11514
+ readonly "basemap.ferries": KnobDefinitionOf<"toggle">;
11515
+ readonly "basemap.borders": KnobDefinitionOf<"toggle">;
11516
+ readonly "basemap.natureLabels": KnobDefinitionOf<"toggle">;
11517
+ readonly "basemap.roadLabels": KnobDefinitionOf<"toggle">;
11518
+ readonly "basemap.roadShields": KnobDefinitionOf<"toggle">;
11519
+ readonly "basemap.houseNumbers": KnobDefinitionOf<"toggle">;
11520
+ readonly "basemap.smallerTownLabels": KnobDefinitionOf<"toggle">;
11521
+ readonly "basemap.stateLabels": KnobDefinitionOf<"toggle">;
11522
+ readonly "basemap.cityLabels": KnobDefinitionOf<"toggle">;
11523
+ readonly "basemap.allPlaceLabels": KnobDefinitionOf<"toggle">;
11524
+ readonly "basemap.capitalLabels": KnobDefinitionOf<"toggle">;
11525
+ readonly "basemap.countryLabels": KnobDefinitionOf<"toggle">;
11546
11526
  readonly 'labels.sizeFactor': KnobDefinitionOf<"factor">;
11547
11527
  readonly 'symbols.sizeFactor': KnobDefinitionOf<"factor">;
11548
11528
  readonly 'roads.widthFactor': KnobDefinitionOf<"factor">;
@@ -11614,71 +11594,9 @@ declare const knobDefinitions: {
11614
11594
  readonly 'colors.roadOutline': KnobDefinitionOf<"color">;
11615
11595
  readonly 'colors.label': KnobDefinitionOf<"color">;
11616
11596
  readonly 'colors.labelOutline': KnobDefinitionOf<"color">;
11617
- readonly 'view.projection': {
11618
- readonly kind: "enum";
11619
- readonly description: "How the map is drawn: flat Mercator or a globe. The globe flattens to Mercator between zoom 11 and 12 by design.";
11620
- readonly options: readonly ["mercator", "globe"];
11621
- readonly appliesTo: "any-style";
11622
- readonly mechanisms: [{
11623
- readonly type: "projection";
11624
- }];
11625
- };
11626
- readonly 'view.sky': {
11627
- readonly kind: "toggle";
11628
- readonly description: "A sky with atmosphere behind the globe and above a tilted flat map. Without it MapLibre draws a fully transparent sky, so a globe arrives with no atmosphere.";
11629
- readonly appliesTo: "any-style";
11630
- readonly mechanisms: [{
11631
- readonly type: "sky";
11632
- }];
11633
- };
11634
- readonly 'view.skyColor': {
11635
- readonly kind: "color";
11636
- readonly description: "Colour of the sky (and of the atmosphere halo around the globe). Defaults to a daylit blue on a light style and a night blue on a dark one.";
11637
- readonly appliesTo: "any-style";
11638
- readonly mechanisms: [{
11639
- readonly type: "sky";
11640
- }];
11641
- };
11642
- readonly 'view.horizonColor': {
11643
- readonly kind: "color";
11644
- readonly description: "Colour of the sky at the horizon. Defaults with the style theme, so a dark map gets a dim horizon rather than a white one.";
11645
- readonly appliesTo: "any-style";
11646
- readonly mechanisms: [{
11647
- readonly type: "sky";
11648
- }];
11649
- };
11650
- readonly 'view.spaceColor': {
11651
- readonly kind: "color";
11652
- readonly description: "Colour behind the map, which a globe leaves visible around the planet. The map canvas is transparent, so without this the page background shows through. Defaults with the style theme: white on a light style, near-black on a dark one.";
11653
- readonly appliesTo: "any-style";
11654
- readonly mechanisms: [{
11655
- readonly type: "space";
11656
- }];
11657
- };
11658
- readonly 'view.terrain': {
11659
- readonly kind: "toggle";
11660
- readonly description: "3D terrain from the style's elevation source (the hillshade style part). Needs a tilted camera to show; MapLibre's terrain fog starts at pitch 60, which is also its default maxPitch.";
11661
- readonly appliesTo: "any-style";
11662
- readonly mechanisms: [{
11663
- readonly type: "terrain";
11664
- }];
11665
- };
11666
- readonly 'view.terrainExaggeration': {
11667
- readonly kind: "number";
11668
- readonly description: "Vertical exaggeration of the 3D terrain (1 = true elevation).";
11669
- readonly range: {
11670
- readonly min: 0.5;
11671
- readonly max: 3;
11672
- readonly step: 0.1;
11673
- };
11674
- readonly appliesTo: "any-style";
11675
- readonly mechanisms: [{
11676
- readonly type: "terrain";
11677
- }];
11678
- };
11679
11597
  };
11680
11598
  /**
11681
- * The id of a styling knob — see {@link StylingModule.describe} for what each one does.
11599
+ * The id of a styling knob — see {@link stylingKnobCatalogue} for what each one does.
11682
11600
  *
11683
11601
  * @group Map Styling
11684
11602
  */
@@ -11689,6 +11607,14 @@ type StylingKnobId = keyof typeof knobDefinitions;
11689
11607
  * @group Map Styling
11690
11608
  */
11691
11609
  export declare const stylingKnobIds: StylingKnobId[];
11610
+ /**
11611
+ * Every styling knob with its kind, description, range or options and the styles it works on, in
11612
+ * catalogue order. Static data: a UI or a coding agent reads it with no map loaded, and
11613
+ * {@link StylingModule.get} gives the value in force on a live one.
11614
+ *
11615
+ * @group Map Styling
11616
+ */
11617
+ export declare const stylingKnobCatalogue: readonly StylingKnob[];
11692
11618
  /**
11693
11619
  * The id of a styling knob that holds a colour — every colour the styling module can name, and so
11694
11620
  * resolve against whichever style is loaded.
@@ -11710,6 +11636,112 @@ type ValueOfKind<KIND extends StylingKnobKind> = KIND extends 'toggle' ? boolean
11710
11636
  */
11711
11637
  type StylingKnobValueOf<ID extends StylingKnobId> = ValueOfKind<(typeof knobDefinitions)[ID]['kind']>;
11712
11638
  //#endregion
11639
+ //#region src/styling/layerQuery.d.ts
11640
+ /**
11641
+ * How {@link StylingModule.layers} picks style layers: by the SDK's base-map group taxonomy, layer
11642
+ * type, vector-tile source layer and case-insensitive id fragments. Every constraint given must hold.
11643
+ *
11644
+ * @group Map Styling
11645
+ */
11646
+ type LayerQuery = {
11647
+ /** A base-map layer group, the same vocabulary as {@link BaseMapModule}. */
11648
+ group?: BaseMapLayerGroupName;
11649
+ /** The style's own `metadata.group` values, for groups the SDK does not name. */
11650
+ metadataGroups?: string[];
11651
+ /** Layer types (`line`, `fill`, `symbol`, …). */
11652
+ layerTypes?: LayerSpecification['type'][];
11653
+ /** Vector-tile source layers (`roads`, `places`, `poi`, …). */
11654
+ sourceLayers?: string[];
11655
+ /** The layer id must contain one of these (case-insensitive). */
11656
+ idIncludes?: string[];
11657
+ /** The layer id must contain none of these (case-insensitive). */
11658
+ idExcludes?: string[];
11659
+ };
11660
+ type PropertyOverride = {
11661
+ kind: 'paint' | 'layout';
11662
+ property: string;
11663
+ value: unknown;
11664
+ };
11665
+ /**
11666
+ * The advanced tier of the styling module: raw MapLibre paint, layout and filter edits over a
11667
+ * query of style layers, re-applied across style switches.
11668
+ *
11669
+ * @remarks
11670
+ * **This is the version-coupled tier.** Layer ids, expressions and even which layers exist belong to
11671
+ * the loaded style version, so an edit may match nothing on the next one: the selection is then empty
11672
+ * and the SDK warns once. Prefer a knob or {@link StylingModule.setMapColors} where one fits.
11673
+ *
11674
+ * Overrides are not part of `getConfig()`: they are edits to this style, not portable settings.
11675
+ *
11676
+ * @example
11677
+ * ```typescript
11678
+ * styling.layers.query({ group: 'roadLabels' }).setPaint({ 'text-color': '#93c5fd' });
11679
+ * styling.layers.query({ metadataGroups: ['water'], layerTypes: ['fill'] }).setPaint({ 'fill-opacity': 0.6 });
11680
+ * styling.layers.query({ idIncludes: ['railway'] }).setVisible(false);
11681
+ * styling.layers.query({ group: 'roadLabels' }).reset();
11682
+ * ```
11683
+ *
11684
+ * @group Map Styling
11685
+ */
11686
+ export declare class LayerSelection {
11687
+ private readonly registry;
11688
+ readonly query: LayerQuery;
11689
+ /**
11690
+ * @ignore
11691
+ */
11692
+ constructor(registry: LayerOverrides, query: LayerQuery);
11693
+ /**
11694
+ * The ids of the layers the query matches in the loaded style, in draw order. Empty when the
11695
+ * style has no such layers.
11696
+ */
11697
+ get layerIds(): string[];
11698
+ /** Sets paint properties on every matched layer. */
11699
+ setPaint(paint: Partial<AllPaintProperties>): this;
11700
+ /** Sets layout properties on every matched layer. */
11701
+ setLayout(layout: Partial<AllLayoutProperties>): this;
11702
+ /**
11703
+ * Replaces the filter the style gave every matched layer. The filters other modules add, such as
11704
+ * POI categories and traffic filters, still narrow it.
11705
+ */
11706
+ setFilter(filter: FilterSpecification | undefined): this;
11707
+ /** Shows or hides every matched layer. */
11708
+ setVisible(visible: boolean): this;
11709
+ /** Removes every override made through the styling module on the matched layers. */
11710
+ reset(): this;
11711
+ }
11712
+ /**
11713
+ * The styling module's registry of raw layer overrides: resolves queries against the loaded style,
11714
+ * applies overrides, remembers what each property was before, and re-applies after a style switch.
11715
+ * Filters go through the map's {@link LayerFilterComposer}, which holds the style's own filter.
11716
+ * @ignore
11717
+ */
11718
+ declare class LayerOverrides {
11719
+ private readonly mapLibreMap;
11720
+ private readonly filterComposer;
11721
+ private readonly warn;
11722
+ private layers;
11723
+ private sources;
11724
+ private readonly properties;
11725
+ private readonly filters;
11726
+ constructor(mapLibreMap: Map, filterComposer: LayerFilterComposer, warn: (key: string, message: string) => void);
11727
+ /** Points the registry at a freshly loaded style; overrides are kept and re-applied by {@link reapply}. */
11728
+ index(layers: LayerSpecification[], sources: StyleSources): void;
11729
+ /** Forgets every override (a clean style switch, which also clears the filter composer). */
11730
+ clear(): void;
11731
+ resolve(query: LayerQuery): string[];
11732
+ override(query: LayerQuery, override: PropertyOverride): void;
11733
+ overrideFilter(query: LayerQuery, filter: FilterSpecification | undefined): void;
11734
+ reset(query: LayerQuery): void;
11735
+ /**
11736
+ * Lands every override again on top of the current style. What an override replaces is re-read
11737
+ * only where something else wrote under it since (a new style, or a knob on the same property);
11738
+ * a layer still carrying the override keeps the value it replaced.
11739
+ */
11740
+ reapply(): void;
11741
+ private read;
11742
+ private write;
11743
+ }
11744
+ //#endregion
11713
11745
  //#region src/styling/StylingModule.d.ts
11714
11746
  /**
11715
11747
  * Event surface of {@link StylingModule}: it owns no map features, so only the lifecycle half is
@@ -11723,15 +11755,15 @@ export type StylingEvents = CombinedEvents<MapGeoJSONFeature, StylingSettings, n
11723
11755
  * hand-editing MapLibre layers.
11724
11756
  *
11725
11757
  * Every adjustable thing is a **knob** with a stable id, a kind, a range and a default read from the
11726
- * loaded style. {@link describe} returns that catalogue as data, so a UI or an AI agent can build
11727
- * controls, validate values and diff state without knowing anything about the style's layers.
11758
+ * loaded style. The ids form the {@link StylingKnobId} union, and {@link stylingKnobCatalogue} lists
11759
+ * each one's kind, range and description as data, with no map needed to read it.
11728
11760
  *
11729
11761
  * @remarks
11730
11762
  * **Which styles a knob works on** is `appliesTo` in the catalogue. `any-style` knobs (sizes,
11731
11763
  * widths) wrap whatever the style already does — `text-size: E` becomes `["*", 1.3, E]` — so they
11732
11764
  * work on a custom style too. `tomtom-styles` knobs (toggles, colours) reach their layers through
11733
- * the TomTom styles this SDK version is verified against; on any other style they report
11734
- * `available: false`, warn once and do nothing rather than failing silently.
11765
+ * the TomTom styles this SDK version is verified against; on any other style setting one warns once
11766
+ * and does nothing, rather than failing silently.
11735
11767
  *
11736
11768
  * **Style changes.** Settings are re-applied after every `setStyle` that carries state over, on top of
11737
11769
  * whatever the other modules restored, and dropped on a clean switch (`resetState: true`).
@@ -11750,9 +11782,9 @@ export type StylingEvents = CombinedEvents<MapGeoJSONFeature, StylingSettings, n
11750
11782
  * styling.set('roads.exitNumbers', false);
11751
11783
  * styling.set('traffic.flow.slowColor', '#f59e0b');
11752
11784
  *
11753
- * // Everything a control panel or an agent needs, as data:
11754
- * for (const knob of styling.describe().knobs) {
11755
- * console.log(knob.id, knob.kind, knob.range, knob.current);
11785
+ * // The catalogue as data, and each knob's value in force:
11786
+ * for (const knob of stylingKnobCatalogue) {
11787
+ * console.log(knob.id, knob.kind, knob.range, styling.get(knob.id));
11756
11788
  * }
11757
11789
  *
11758
11790
  * // Serializable, diffable, re-applicable:
@@ -11774,9 +11806,11 @@ export declare class StylingModule extends AbstractStyleOwnedMapModule<Record<st
11774
11806
  private mapColorTargetsByKey;
11775
11807
  private mapColorTargetsByKnob;
11776
11808
  private mapColorAnchors;
11809
+ private landDerivedColors;
11777
11810
  private warned;
11778
11811
  private reindexed;
11779
11812
  private originalSpaceColor;
11813
+ private layerOverrides;
11780
11814
  /**
11781
11815
  * Retrieves the styling module of the given map, creating it on first use.
11782
11816
  *
@@ -11809,23 +11843,25 @@ export declare class StylingModule extends AbstractStyleOwnedMapModule<Record<st
11809
11843
  */
11810
11844
  protected _applyConfig(settings: StylingSettings | undefined): StylingSettings | undefined;
11811
11845
  /**
11812
- * The styling catalogue for the loaded style: every knob with its kind, range, default, current
11813
- * value and how many layers it reaches.
11814
- *
11815
- * @remarks
11816
- * Meant to be consumed as data — build a control panel from it, hand it to an agent, or diff two
11817
- * calls. Knob ids and the shape of the entries are public API and change additively only.
11846
+ * @ignore
11847
+ */
11848
+ protected discardShownData(): void;
11849
+ /**
11850
+ * The advanced tier: raw MapLibre paint, layout and filter edits over a query of style layers,
11851
+ * re-applied across style switches. Version-coupled by nature — see {@link LayerSelection} for
11852
+ * the terms — so prefer a knob or {@link setMapColors} wherever one covers the intent.
11818
11853
  *
11819
11854
  * @example
11820
11855
  * ```typescript
11821
- * const { knobs } = styling.describe();
11822
- * const sliders = knobs.filter((knob) => knob.kind === 'factor' && knob.available);
11856
+ * styling.layers.query({ group: 'roadLabels' }).setPaint({ 'text-color': '#93c5fd' });
11823
11857
  * ```
11824
11858
  */
11825
- describe(): StylingCatalogue;
11859
+ get layers(): {
11860
+ query: (query: LayerQuery) => LayerSelection;
11861
+ };
11826
11862
  /**
11827
11863
  * Applies a preset: a named bundle of knob settings the SDK ships for a common intent
11828
- * (`data-viz`, `night-driving`, `minimal`, `globe`, `terrain`). See `describe().presets` for
11864
+ * (`data-viz`, `night-driving`, `minimal`, `globe`). See {@link stylingPresetCatalogue} for
11829
11865
  * what each one sets.
11830
11866
  *
11831
11867
  * @param id - The preset to apply.
@@ -11861,7 +11897,7 @@ export declare class StylingModule extends AbstractStyleOwnedMapModule<Record<st
11861
11897
  * Sets one knob. The value is validated against the knob's kind and range before anything is
11862
11898
  * touched, and applied to every layer the knob reaches.
11863
11899
  *
11864
- * @param id - The knob to set; see {@link describe} for the catalogue.
11900
+ * @param id - The knob to set; see {@link stylingKnobCatalogue} for the catalogue.
11865
11901
  * @param value - A number for `factor`/`number` knobs (within `range`), a boolean for `toggle`
11866
11902
  * knobs, a CSS colour string for `color` knobs.
11867
11903
  * @throws `RangeError` when the value is not valid for the knob; `Error` for an unknown id.
@@ -11887,14 +11923,16 @@ export declare class StylingModule extends AbstractStyleOwnedMapModule<Record<st
11887
11923
  */
11888
11924
  reset(id?: StylingKnobId): void;
11889
11925
  /**
11890
- * Recolours the whole base map with up to ten semantic colours in one call — Map Maker's
11891
- * Foundations palette, each listed with what it reaches under {@link MapColorName}. Partial
11892
- * objects are fine; colours not given stay as they are.
11926
+ * Recolours the whole base map with up to ten semantic colours in one call — the style
11927
+ * themes' Foundations palette, each listed with what it reaches under {@link MapColorName}. Partial
11928
+ * objects are fine; colours not given stay as they are, except on the mono styles, which derive
11929
+ * the other nine from `land` as their theme does: there the theme's own formulas re-derive them
11930
+ * from the `land` given.
11893
11931
  *
11894
11932
  * @remarks
11895
11933
  * Each colour re-derives every shade the style built from it — a trunk variant, an outline, a
11896
11934
  * tunnel — at the style's own HSL offset, so those relationships survive the recolour. The ten
11897
- * are also the `colors.*` knobs, so `describe()`, `reset` and settings persistence apply.
11935
+ * are also the `colors.*` knobs, so `get`, `reset` and settings persistence apply.
11898
11936
  *
11899
11937
  * Those offsets come off the loaded style, which makes a palette a recolour and not an
11900
11938
  * inversion: dark land over `standardLight` pushes the derived shades to the ends of their
@@ -11907,6 +11945,7 @@ export declare class StylingModule extends AbstractStyleOwnedMapModule<Record<st
11907
11945
  * ```typescript
11908
11946
  * styling.setMapColors({ land: '#f3f5f7', water: '#accbe2', roadMajor: '#a1b8ce', label: '#364659' });
11909
11947
  * styling.reset('colors.roadMajor'); // one colour back to the style
11948
+ * styling.setMapColors(deriveMapColors(['#0b2a3a', '#0fa8c8', '#f6efe3'])); // map-theme plugin assigns the roles
11910
11949
  * ```
11911
11950
  */
11912
11951
  setMapColors(colors: MapColors): void;
@@ -11934,22 +11973,24 @@ export declare class StylingModule extends AbstractStyleOwnedMapModule<Record<st
11934
11973
  private capture;
11935
11974
  private originalValueOf;
11936
11975
  private resolveMapColor;
11937
- private demSourceId;
11938
11976
  private refreshKnob;
11939
11977
  private refreshMechanism;
11978
+ private refreshLayer;
11940
11979
  private refreshSpace;
11941
11980
  private defaultSpaceColor;
11981
+ private refreshMapColor;
11982
+ private derivedMapColorOf;
11983
+ private mapColorsOf;
11942
11984
  private refreshMapColorProperty;
11943
11985
  private refreshProjection;
11944
11986
  private refreshSky;
11945
- private refreshTerrain;
11946
11987
  private refreshVisibility;
11947
- private refreshMinZoom;
11988
+ private refreshZoomBound;
11989
+ private styleZoomBound;
11948
11990
  private refreshZoomOffset;
11949
11991
  private refreshScaledProperty;
11950
11992
  private refreshColor;
11951
11993
  private setProperty;
11952
- private describeKnob;
11953
11994
  private defaultOf;
11954
11995
  private mapLevelDefaultOf;
11955
11996
  private assertKnob;
@@ -11957,6 +11998,147 @@ export declare class StylingModule extends AbstractStyleOwnedMapModule<Record<st
11957
11998
  private warnOnce;
11958
11999
  }
11959
12000
  //#endregion
12001
+ //#region src/terrain/types/terrainModuleConfig.d.ts
12002
+ /**
12003
+ * Configuration of the {@link TerrainModule}: the two ways it draws the relief of the style's
12004
+ * elevation data.
12005
+ *
12006
+ * @remarks
12007
+ * Unset, the hillshade is hidden like the other style parts the SDK adds (traffic flow and
12008
+ * incidents), and the surface is left as the map draws it: flat on TomTom styles. So
12009
+ * `resetConfig()` returns a TomTom style to flat and unshaded.
12010
+ *
12011
+ * @example
12012
+ * ```typescript
12013
+ * const config: TerrainModuleConfig = { hillshade: true, elevation: true, elevationExaggeration: 1.5 };
12014
+ * ```
12015
+ *
12016
+ * @group Terrain
12017
+ */
12018
+ type TerrainModuleConfig = MapModuleCommonConfig & {
12019
+ /**
12020
+ * Shows the hillshade: light and shadow on the map surface that reveal hills, valleys and
12021
+ * mountains, at any camera pitch. Its look is set by the `hillshade.*` knobs of {@link StylingModule}.
12022
+ *
12023
+ * @default false
12024
+ */
12025
+ hillshade?: boolean;
12026
+ /**
12027
+ * Raises the map surface to the elevation data in 3D, or flattens it. Shows best with a
12028
+ * pitched camera.
12029
+ *
12030
+ * @default The map's own terrain, if its style or MapLibre code raised one; none on TomTom styles.
12031
+ */
12032
+ elevation?: boolean;
12033
+ /**
12034
+ * Vertical scaling of the 3D surface: `1` is true elevation, higher values emphasise the
12035
+ * relief. Kept while `elevation` is off, so turning it back on restores it.
12036
+ *
12037
+ * @default 1
12038
+ */
12039
+ elevationExaggeration?: number;
12040
+ };
12041
+ //#endregion
12042
+ //#region src/terrain/TerrainModule.d.ts
12043
+ /**
12044
+ * The style source this module draws from: the raster-dem elevation source of the hillshade
12045
+ * style part, with its hillshade layers.
12046
+ */
12047
+ type TerrainSourcesWithLayers = {
12048
+ hillshade: StyleSourceWithLayers;
12049
+ };
12050
+ /**
12051
+ * Map module for the terrain relief: hillshade shading and the 3D surface, both drawn from the
12052
+ * elevation data of the map style.
12053
+ *
12054
+ * @remarks
12055
+ * **What this module owns:** whether the hillshade is shown, and whether and how high the surface is raised.
12056
+ * Shading method, light direction, strength, zoom range and colours are `hillshade.*` {@link StylingModule} knobs.
12057
+ * See [Who owns what](https://docs.tomtom.com/maps-sdk-js/guides/map/modules#who-owns-what).
12058
+ *
12059
+ * - **Hillshade** shades slopes on the flat map, so the relief reads at any pitch.
12060
+ * - **Elevation** raises the map surface in 3D, which a pitched camera shows. Combined with the
12061
+ * hillshade, a slope stays readable where the camera flattens it.
12062
+ *
12063
+ * `get()` adds the elevation style part when the style lacks it, and the module restores both
12064
+ * after every style change. The 3D surface reads its own copy of the elevation source,
12065
+ * {@link TERRAIN_SOURCE_ID}.
12066
+ *
12067
+ * @example
12068
+ * ```typescript
12069
+ * const terrain = await TerrainModule.get(map, { hillshade: true, elevation: true, elevationExaggeration: 1.3 });
12070
+ * terrain.setElevationExaggeration(2);
12071
+ * terrain.setElevationEnabled(false); // flat again, still shaded
12072
+ * ```
12073
+ *
12074
+ * @see [Terrain Guide](https://docs.tomtom.com/maps-sdk-js/guides/map/terrain)
12075
+ *
12076
+ * @group Terrain
12077
+ */
12078
+ export declare class TerrainModule extends AbstractStyleOwnedMapModule<TerrainSourcesWithLayers, TerrainModuleConfig> {
12079
+ private mapTerrain;
12080
+ private overridesMapTerrain;
12081
+ /**
12082
+ * Retrieves the terrain module of the given map, adding the elevation style part first when
12083
+ * the style lacks it.
12084
+ *
12085
+ * @param config - Without it the hillshade is hidden, and the surface stays as the map draws it.
12086
+ *
12087
+ * @remarks
12088
+ * **Instances:** one per map — a second `get()` returns the same instance, with the given config
12089
+ * applied to it.
12090
+ *
12091
+ * @throws Error if the elevation source cannot be added to the style.
12092
+ */
12093
+ static get(map: TomTomMap, config?: TerrainModuleConfig): Promise<TerrainModule>;
12094
+ private constructor();
12095
+ /**
12096
+ * @ignore
12097
+ */
12098
+ protected _initSourcesWithLayers(): {
12099
+ hillshade: StyleSourceWithLayers<import("maplibre-gl").SourceSpecification, import("maplibre-gl").Source>;
12100
+ };
12101
+ /**
12102
+ * @ignore
12103
+ */
12104
+ protected _applyConfig(config: TerrainModuleConfig | undefined): TerrainModuleConfig | undefined;
12105
+ /**
12106
+ * Shows or hides the hillshade shading.
12107
+ */
12108
+ setHillshadeVisible(visible: boolean): void;
12109
+ /**
12110
+ * Whether the hillshade shading is shown.
12111
+ */
12112
+ isHillshadeVisible(): boolean;
12113
+ /**
12114
+ * Raises the map surface in 3D, or flattens it, keeping the configured exaggeration.
12115
+ */
12116
+ setElevationEnabled(enabled: boolean): void;
12117
+ /**
12118
+ * Whether the map surface is raised in 3D.
12119
+ */
12120
+ isElevationEnabled(): boolean;
12121
+ /**
12122
+ * Sets the vertical {@link TerrainModuleConfig.elevationExaggeration | exaggeration} of the 3D
12123
+ * surface, kept for when elevation is enabled later.
12124
+ */
12125
+ setElevationExaggeration(elevationExaggeration: number): void;
12126
+ /**
12127
+ * Lifecycle events of this module. The hillshade is a raster layer with no features to
12128
+ * interact with, so there are no user interaction events; `config-change` fires after every
12129
+ * change.
12130
+ *
12131
+ * @example
12132
+ * ```typescript
12133
+ * const unsubscribe = terrain.events.on('config-change', (config) => console.log(config));
12134
+ * ```
12135
+ */
12136
+ get events(): ModuleEvents<TerrainModuleConfig>;
12137
+ private showHillshade;
12138
+ private showElevation;
12139
+ private storeConfig;
12140
+ }
12141
+ //#endregion
11960
12142
  //#region src/traffic/types/trafficAreaAnalyticsConfig.d.ts
11961
12143
  /**
11962
12144
  * A single stop in an analytics color ramp.
@@ -12153,7 +12335,7 @@ type AreaAnalyticsMetricConfig = {
12153
12335
  * @example
12154
12336
  * ```typescript
12155
12337
  * // Move all layers below the lowest label
12156
- * const config: TrafficAreaAnalyticsConfig = {
12338
+ * const config: TrafficAreaAnalyticsModuleConfig = {
12157
12339
  * beforeLayerConfig: {
12158
12340
  * heatmap: 'lowestLabel',
12159
12341
  * hexgrid: { flat2D: 'lowestLabel', extrusion3D: 'lowestPlaceLabel' },
@@ -12162,7 +12344,7 @@ type AreaAnalyticsMetricConfig = {
12162
12344
  * };
12163
12345
  *
12164
12346
  * // Only reposition the heatmap layer
12165
- * const config: TrafficAreaAnalyticsConfig = {
12347
+ * const config: TrafficAreaAnalyticsModuleConfig = {
12166
12348
  * beforeLayerConfig: { heatmap: 'top' },
12167
12349
  * };
12168
12350
  * ```
@@ -12246,7 +12428,7 @@ declare const TRAFFIC_LIGHT_COLORS: {
12246
12428
  readonly bad: "#e03030";
12247
12429
  };
12248
12430
  /**
12249
- * Default values for all {@link TrafficAreaAnalyticsConfig} options.
12431
+ * Default values for all {@link TrafficAreaAnalyticsModuleConfig} options.
12250
12432
  *
12251
12433
  * Use these as a reference for what the module applies when a property is omitted,
12252
12434
  * or spread them as a base when constructing a config programmatically.
@@ -12254,13 +12436,13 @@ declare const TRAFFIC_LIGHT_COLORS: {
12254
12436
  * @group Traffic Area Analytics
12255
12437
  */
12256
12438
  declare const AREA_ANALYTICS_DEFAULTS: {
12257
- /** @see {@link TrafficAreaAnalyticsConfig.visible} */
12439
+ /** @see {@link TrafficAreaAnalyticsModuleConfig.visible} */
12258
12440
  visible: true;
12259
- /** @see {@link TrafficAreaAnalyticsConfig.displayMode} */
12441
+ /** @see {@link TrafficAreaAnalyticsModuleConfig.displayMode} */
12260
12442
  displayMode: "hexgrid-3d";
12261
- /** @see {@link TrafficAreaAnalyticsConfig.activeMetric} */
12443
+ /** @see {@link TrafficAreaAnalyticsModuleConfig.activeMetric} */
12262
12444
  activeMetric: "congestionLevel";
12263
- /** @see {@link TrafficAreaAnalyticsConfig.metricConfig} */
12445
+ /** @see {@link TrafficAreaAnalyticsModuleConfig.metricConfig} */
12264
12446
  metricConfig: {
12265
12447
  congestionLevel: {
12266
12448
  color: {
@@ -12385,7 +12567,7 @@ declare const AREA_ANALYTICS_DEFAULTS: {
12385
12567
  *
12386
12568
  * @example
12387
12569
  * ```typescript
12388
- * const config: TrafficAreaAnalyticsConfig = {
12570
+ * const config: TrafficAreaAnalyticsModuleConfig = {
12389
12571
  * displayMode: 'hexgrid-3d',
12390
12572
  * activeMetric: 'congestionLevel',
12391
12573
  * metricConfig: {
@@ -12410,7 +12592,7 @@ declare const AREA_ANALYTICS_DEFAULTS: {
12410
12592
  *
12411
12593
  * @group Traffic Area Analytics
12412
12594
  */
12413
- type TrafficAreaAnalyticsConfig = MapModuleCommonConfig & {
12595
+ type TrafficAreaAnalyticsModuleConfig = MapModuleCommonConfig & {
12414
12596
  /**
12415
12597
  * Controls the visibility of the area analytics layers.
12416
12598
  *
@@ -12517,7 +12699,7 @@ type AreaAnalyticsSourcesWithLayers = {
12517
12699
  *
12518
12700
  * @group Traffic Area Analytics
12519
12701
  */
12520
- export declare class TrafficAreaAnalyticsModule extends AbstractDataOwnedMapModule<AreaAnalyticsSourcesWithLayers, TrafficAreaAnalyticsConfig> {
12702
+ export declare class TrafficAreaAnalyticsModule extends AbstractDataOwnedMapModule<AreaAnalyticsSourcesWithLayers, TrafficAreaAnalyticsModuleConfig> {
12521
12703
  private heatmapLayerSpec;
12522
12704
  private hexFillLayerSpec;
12523
12705
  private hexExtrusionLayerSpec;
@@ -12563,12 +12745,13 @@ export declare class TrafficAreaAnalyticsModule extends AbstractDataOwnedMapModu
12563
12745
  * });
12564
12746
  * ```
12565
12747
  */
12566
- static create(tomtomMap: TomTomMap, config?: TrafficAreaAnalyticsConfig): Promise<TrafficAreaAnalyticsModule>;
12748
+ static create(tomtomMap: TomTomMap, config?: TrafficAreaAnalyticsModuleConfig): Promise<TrafficAreaAnalyticsModule>;
12567
12749
  private constructor();
12568
12750
  /** @ignore */
12569
- protected _initSourcesWithLayers(config?: TrafficAreaAnalyticsConfig, _restore?: boolean): AreaAnalyticsSourcesWithLayers;
12751
+ protected _initSourcesWithLayers(config?: TrafficAreaAnalyticsModuleConfig, _restore?: boolean): AreaAnalyticsSourcesWithLayers;
12570
12752
  /** @ignore */
12571
- protected _applyConfig(config: TrafficAreaAnalyticsConfig | undefined): TrafficAreaAnalyticsConfig | undefined;
12753
+ protected _applyConfig(config: TrafficAreaAnalyticsModuleConfig | undefined): TrafficAreaAnalyticsModuleConfig | undefined;
12754
+ private moveLayersToSpecPositions;
12572
12755
  /** @ignore */
12573
12756
  protected discardShownData(): void;
12574
12757
  /** @ignore */
@@ -12730,7 +12913,7 @@ export declare class TrafficAreaAnalyticsModule extends AbstractDataOwnedMapModu
12730
12913
  * });
12731
12914
  * ```
12732
12915
  */
12733
- get events(): CombinedEvents<AreaAnalyticsTileFeature, TrafficAreaAnalyticsConfig, TrafficAreaAnalytics>;
12916
+ get events(): CombinedEvents<AreaAnalyticsTileFeature, TrafficAreaAnalyticsModuleConfig, TrafficAreaAnalytics>;
12734
12917
  private get mode();
12735
12918
  private get activeMetric();
12736
12919
  private get lightDark();
@@ -12863,7 +13046,7 @@ export type TrafficCommonFilter = {
12863
13046
  * @example
12864
13047
  * ```ts
12865
13048
  * // Hide minor local streets
12866
- * roadSubCategories: { show: 'all_except', values: ['living_street'] }
13049
+ * roadSubCategories: { show: 'all-except', values: ['living_street'] }
12867
13050
  * ```
12868
13051
  */
12869
13052
  roadSubCategories?: ValuesFilter<RoadSubCategory>;
@@ -12935,7 +13118,7 @@ export type TrafficFlowFilters = {
12935
13118
  *
12936
13119
  * @group Traffic Flow
12937
13120
  */
12938
- export type FlowConfig = MapModuleCommonConfig & {
13121
+ export type TrafficFlowModuleConfig = MapModuleCommonConfig & {
12939
13122
  /**
12940
13123
  * Controls the visibility of the traffic flow layers.
12941
13124
  *
@@ -12957,6 +13140,12 @@ export type FlowConfig = MapModuleCommonConfig & {
12957
13140
  * Defines the structure of a traffic flow feature, which extends the basic GeoJSON feature
12958
13141
  * with properties extracted from the traffic flow vector tiles.
12959
13142
  *
13143
+ * @remarks
13144
+ * `absoluteSpeed`, `partOfTwoWayRoad` and `openlr` stay `undefined` with the standard styles, which do
13145
+ * not request their tile tags; a custom style whose flow source asks for them populates them.
13146
+ * No flow tile carries free-flow speed, travel time, delay or confidence: for historical speed and
13147
+ * congestion over an area, use the Traffic Area Analytics service.
13148
+ *
12960
13149
  * @group Traffic Flow
12961
13150
  */
12962
13151
  export type TrafficFlowModuleFeature = Feature<LineString, {
@@ -13012,6 +13201,10 @@ type TrafficFlowSourcesWithLayers = {
13012
13201
  * traffic speed conditions using color-coded road segments.
13013
13202
  *
13014
13203
  * @remarks
13204
+ * **What this module owns:** whether the style's traffic-flow layers are shown, and for which roads.
13205
+ * Each flow level's colour and the line width are `traffic.flow.*` knobs on {@link StylingModule}.
13206
+ * See [Who owns what](https://docs.tomtom.com/maps-sdk-js/guides/map/modules#who-owns-what).
13207
+ *
13015
13208
  * **Features:**
13016
13209
  * - Toggle traffic flow visibility on/off
13017
13210
  * - Filter by road categories and types
@@ -13057,7 +13250,7 @@ type TrafficFlowSourcesWithLayers = {
13057
13250
  * trafficFlow.filter({
13058
13251
  * any: [{
13059
13252
  * roadCategories: {
13060
- * show: 'all_except',
13253
+ * show: 'all-except',
13061
13254
  * values: ['street']
13062
13255
  * }
13063
13256
  * }]
@@ -13079,7 +13272,7 @@ type TrafficFlowSourcesWithLayers = {
13079
13272
  *
13080
13273
  * @group Traffic Flow
13081
13274
  */
13082
- export declare class TrafficFlowModule extends AbstractStyleOwnedMapModule<TrafficFlowSourcesWithLayers, FlowConfig> {
13275
+ export declare class TrafficFlowModule extends AbstractStyleOwnedMapModule<TrafficFlowSourcesWithLayers, TrafficFlowModuleConfig> {
13083
13276
  /**
13084
13277
  * Retrieves a TrafficFlowModule instance for the given map.
13085
13278
  *
@@ -13127,7 +13320,7 @@ export declare class TrafficFlowModule extends AbstractStyleOwnedMapModule<Traff
13127
13320
  * provides, under fixed global IDs. Every instance is another handle on that same shared state,
13128
13321
  * so visibility and filters applied through one are visible through all of them.
13129
13322
  */
13130
- static get(map: TomTomMap, config?: FlowConfig): Promise<TrafficFlowModule>;
13323
+ static get(map: TomTomMap, config?: TrafficFlowModuleConfig): Promise<TrafficFlowModule>;
13131
13324
  private constructor();
13132
13325
  /**
13133
13326
  * @ignore
@@ -13138,7 +13331,7 @@ export declare class TrafficFlowModule extends AbstractStyleOwnedMapModule<Traff
13138
13331
  /**
13139
13332
  * @ignore
13140
13333
  */
13141
- protected _applyConfig(config: FlowConfig | undefined): FlowConfig | undefined;
13334
+ protected _applyConfig(config: TrafficFlowModuleConfig | undefined): TrafficFlowModuleConfig | undefined;
13142
13335
  private getLayers;
13143
13336
  /**
13144
13337
  * Applies filters to traffic flow display.
@@ -13182,7 +13375,7 @@ export declare class TrafficFlowModule extends AbstractStyleOwnedMapModule<Traff
13182
13375
  * trafficFlow.filter({
13183
13376
  * any: [{
13184
13377
  * roadCategories: {
13185
- * show: 'all_except',
13378
+ * show: 'all-except',
13186
13379
  * values: ['street']
13187
13380
  * }
13188
13381
  * }]
@@ -13235,16 +13428,9 @@ export declare class TrafficFlowModule extends AbstractStyleOwnedMapModule<Traff
13235
13428
  * @returns An object containing visible traffic flow features.
13236
13429
  *
13237
13430
  * @remarks
13238
- * Returns all traffic flow features currently rendered in the visible map area.
13239
- * These represent road segments with real-time traffic speed information.
13240
- *
13241
- * **Feature Properties:**
13242
- * Properties depend on the traffic flow vector tile schema and may include:
13243
- * - Current speed
13244
- * - Free flow speed
13245
- * - Road category
13246
- * - Congestion level
13247
- * - Road closure status
13431
+ * The only way to read live flow values: Orbis traffic flow is vector tiles, with no service for a
13432
+ * road, a point or an area. Results cover the current viewport and zoom, and a segment crossing a
13433
+ * tile boundary appears once per tile. See {@link TrafficFlowModuleFeature} for what each carries.
13248
13434
  *
13249
13435
  * @example
13250
13436
  * ```typescript
@@ -13260,7 +13446,7 @@ export declare class TrafficFlowModule extends AbstractStyleOwnedMapModule<Traff
13260
13446
  * ```typescript
13261
13447
  * const shown = trafficFlow.getShown();
13262
13448
  * const congested = shown.trafficFlow.filter(
13263
- * segment => segment.properties.speed < segment.properties.freeFlowSpeed * 0.5
13449
+ * segment => segment.properties.relativeSpeed < 0.5
13264
13450
  * );
13265
13451
  * console.log(`Congested segments: ${congested.length}`);
13266
13452
  * ```
@@ -13268,7 +13454,7 @@ export declare class TrafficFlowModule extends AbstractStyleOwnedMapModule<Traff
13268
13454
  getShown(): {
13269
13455
  trafficFlow: TrafficFlowModuleFeature[];
13270
13456
  };
13271
- get events(): CombinedEvents<TrafficFlowModuleFeature, FlowConfig, never>;
13457
+ get events(): CombinedEvents<TrafficFlowModuleFeature, TrafficFlowModuleConfig, never>;
13272
13458
  }
13273
13459
  //#endregion
13274
13460
  //#region src/traffic/types/trafficIncidentOverlayConfig.d.ts
@@ -13296,7 +13482,7 @@ type IncidentFocusStyle = {
13296
13482
  *
13297
13483
  * @group Traffic
13298
13484
  */
13299
- type TrafficIncidentOverlayConfig = MapModuleCommonConfig & {
13485
+ type TrafficIncidentOverlayModuleConfig = MapModuleCommonConfig & {
13300
13486
  /**
13301
13487
  * Initial visibility of all incident layers. Defaults to `true`.
13302
13488
  * `show()` never flips this flag — if `false`, the module loads data but
@@ -13422,7 +13608,7 @@ type Sources = {
13422
13608
  *
13423
13609
  * @group Traffic
13424
13610
  */
13425
- export declare class TrafficIncidentOverlayModule extends AbstractDataOwnedMapModule<Sources, TrafficIncidentOverlayConfig> {
13611
+ export declare class TrafficIncidentOverlayModule extends AbstractDataOwnedMapModule<Sources, TrafficIncidentOverlayModuleConfig> {
13426
13612
  private lastResult;
13427
13613
  private lastFeatureIds;
13428
13614
  private lastFocusIds;
@@ -13438,12 +13624,12 @@ export declare class TrafficIncidentOverlayModule extends AbstractDataOwnedMapMo
13438
13624
  * @param config The module optional configuration.
13439
13625
  * @returns {Promise} Returns a promise with a new instance of this module.
13440
13626
  */
13441
- static create(tomtomMap: TomTomMap, config?: TrafficIncidentOverlayConfig): Promise<TrafficIncidentOverlayModule>;
13627
+ static create(tomtomMap: TomTomMap, config?: TrafficIncidentOverlayModuleConfig): Promise<TrafficIncidentOverlayModule>;
13442
13628
  private constructor();
13443
13629
  /** @ignore */
13444
- protected _initSourcesWithLayers(config?: TrafficIncidentOverlayConfig, _restore?: boolean): Sources;
13630
+ protected _initSourcesWithLayers(config?: TrafficIncidentOverlayModuleConfig, _restore?: boolean): Sources;
13445
13631
  /** @ignore */
13446
- protected _applyConfig(config: TrafficIncidentOverlayConfig | undefined): TrafficIncidentOverlayConfig | undefined;
13632
+ protected _applyConfig(config: TrafficIncidentOverlayModuleConfig | undefined): TrafficIncidentOverlayModuleConfig | undefined;
13447
13633
  private applyBeforeLayer;
13448
13634
  /** @ignore */
13449
13635
  protected discardShownData(): void;
@@ -13481,7 +13667,7 @@ export declare class TrafficIncidentOverlayModule extends AbstractDataOwnedMapMo
13481
13667
  getShown(): {
13482
13668
  incidents: TrafficIncidentDetails;
13483
13669
  };
13484
- get events(): CombinedEvents<TrafficIncident, TrafficIncidentOverlayConfig, TrafficIncidentDetails>;
13670
+ get events(): CombinedEvents<TrafficIncident, TrafficIncidentOverlayModuleConfig, TrafficIncidentDetails>;
13485
13671
  /**
13486
13672
  * Mark a subset of currently-rendered incidents as "focused" via MapLibre
13487
13673
  * feature-state. `null` clears the state. Paint expressions in
@@ -13579,7 +13765,7 @@ export type TrafficIncidentsFilter = TrafficCommonFilter & {
13579
13765
  * magnitudes: { show: 'only', values: ['moderate', 'major'] }
13580
13766
  *
13581
13767
  * // Hide minor incidents
13582
- * magnitudes: { show: 'all_except', values: ['minor'] }
13768
+ * magnitudes: { show: 'all-except', values: ['minor'] }
13583
13769
  * ```
13584
13770
  */
13585
13771
  magnitudes?: ValuesFilter<DelayMagnitude>;
@@ -13656,7 +13842,7 @@ export type IncidentsCommonConfig = {
13656
13842
  *
13657
13843
  * @group Traffic Incidents
13658
13844
  */
13659
- export type IncidentsConfig = MapModuleCommonConfig & IncidentsCommonConfig & {
13845
+ export type TrafficIncidentsModuleConfig = MapModuleCommonConfig & IncidentsCommonConfig & {
13660
13846
  /**
13661
13847
  * Configuration specific to incident icon display.
13662
13848
  *
@@ -13724,6 +13910,10 @@ type TrafficIncidentsSourcesWithLayers = {
13724
13910
  * events like accidents, road closures, construction, and hazards.
13725
13911
  *
13726
13912
  * @remarks
13913
+ * **What this module owns:** whether the style's incident layers are shown, and which incidents.
13914
+ * Each magnitude's colour and the line width are `traffic.incidents.*` knobs on {@link StylingModule}.
13915
+ * See [Who owns what](https://docs.tomtom.com/maps-sdk-js/guides/map/modules#who-owns-what).
13916
+ *
13727
13917
  * **Features:**
13728
13918
  * - Toggle incidents visibility on/off
13729
13919
  * - Separate control for incident icons
@@ -13776,7 +13966,7 @@ type TrafficIncidentsSourcesWithLayers = {
13776
13966
  * trafficIncidentsModule.filter({
13777
13967
  * any: [{
13778
13968
  * incidentCategories: {
13779
- * show: 'all_except',
13969
+ * show: 'all-except',
13780
13970
  * values: ['roadworks']
13781
13971
  * }
13782
13972
  * }]
@@ -13832,7 +14022,7 @@ type TrafficIncidentsSourcesWithLayers = {
13832
14022
  *
13833
14023
  * @group Traffic Incidents
13834
14024
  */
13835
- export declare class TrafficIncidentsModule extends AbstractStyleOwnedMapModule<TrafficIncidentsSourcesWithLayers, IncidentsConfig> {
14025
+ export declare class TrafficIncidentsModule extends AbstractStyleOwnedMapModule<TrafficIncidentsSourcesWithLayers, TrafficIncidentsModuleConfig> {
13836
14026
  /**
13837
14027
  * Retrieves a TrafficIncidentsModule instance for the given map.
13838
14028
  *
@@ -13880,7 +14070,7 @@ export declare class TrafficIncidentsModule extends AbstractStyleOwnedMapModule<
13880
14070
  * provides, under fixed global IDs. Every instance is another handle on that same shared state,
13881
14071
  * so visibility and filters applied through one are visible through all of them.
13882
14072
  */
13883
- static get(map: TomTomMap, config?: IncidentsConfig): Promise<TrafficIncidentsModule>;
14073
+ static get(map: TomTomMap, config?: TrafficIncidentsModuleConfig): Promise<TrafficIncidentsModule>;
13884
14074
  private constructor();
13885
14075
  /**
13886
14076
  * @ignore
@@ -13891,7 +14081,7 @@ export declare class TrafficIncidentsModule extends AbstractStyleOwnedMapModule<
13891
14081
  /**
13892
14082
  * @ignore
13893
14083
  */
13894
- protected _applyConfig(config: IncidentsConfig | undefined): IncidentsConfig | undefined;
14084
+ protected _applyConfig(config: TrafficIncidentsModuleConfig | undefined): TrafficIncidentsModuleConfig | undefined;
13895
14085
  /**
13896
14086
  * Applies filters to traffic incidents display.
13897
14087
  *
@@ -14073,7 +14263,7 @@ export declare class TrafficIncidentsModule extends AbstractStyleOwnedMapModule<
14073
14263
  getShown(): {
14074
14264
  trafficIncidents: TrafficIncidentsModuleFeature[];
14075
14265
  };
14076
- get events(): CombinedEvents<TrafficIncidentsModuleFeature, IncidentsConfig, never>;
14266
+ get events(): CombinedEvents<TrafficIncidentsModuleFeature, TrafficIncidentsModuleConfig, never>;
14077
14267
  }
14078
14268
  //#endregion
14079
14269
  //#region src/utils/colorUtils.d.ts
@@ -14083,12 +14273,34 @@ export declare class TrafficIncidentsModule extends AbstractStyleOwnedMapModule<
14083
14273
  */
14084
14274
  type RGBAColor = [number, number, number, number];
14085
14275
  /**
14086
- * Parses any CSS colour a map style writes — `#rgb`, `#rrggbb(aa)`, `rgb()`/`rgba()` in numbers or
14087
- * percentages, `hsl()`/`hsla()`, `transparent` and the named colours — or `undefined` for a string
14088
- * that is not one.
14276
+ * {@link parseColor} as an {@link RGBAColor} tuple.
14089
14277
  * @ignore
14090
14278
  */
14091
14279
  export declare const parseCssColor: (cssColor: string) => RGBAColor | undefined;
14280
+ /**
14281
+ * A colour in HSL: hue in degrees (none for a grey), saturation, lightness and alpha 0–1 — the shape
14282
+ * of culori's `Hsl`, so culori's functions take it.
14283
+ * @ignore
14284
+ */
14285
+ type HslColor = {
14286
+ mode: 'hsl';
14287
+ h?: number;
14288
+ s: number;
14289
+ l: number;
14290
+ alpha?: number;
14291
+ };
14292
+ /**
14293
+ * The HSL of a CSS colour, or `undefined` when it cannot be parsed. Read through sRGB, so an
14294
+ * `hsl()` literal comes back canonical — white has no saturation, a grey no hue.
14295
+ * @ignore
14296
+ */
14297
+ export declare const toHsl: (cssColor: string) => HslColor | undefined;
14298
+ /**
14299
+ * Formats an HSL colour as a CSS `hsl()`/`hsla()` string, rounded to what the map styles themselves
14300
+ * use: whole degrees and percents.
14301
+ * @ignore
14302
+ */
14303
+ export declare const formatStyleHsl: (hsl: Omit<HslColor, "mode">) => string;
14092
14304
  //#endregion
14093
14305
  //#region src/utils/types/paddedBounds.d.ts
14094
14306
  /**
@@ -14170,4 +14382,4 @@ export declare const calculatePaddedCenter: (options: CalculateMapCenterOptions)
14170
14382
  */
14171
14383
  export declare const calculateFittingBBox: (options: CalculateFittingBBoxOptions) => BBox | null;
14172
14384
  //#endregion
14173
- export type { AREA_ANALYTICS_DEFAULTS, AreaAnalyticsBeforeLayerConfig, AreaAnalyticsColorStop, AreaAnalyticsColorStopsConfig, AreaAnalyticsColorTheme, AreaAnalyticsDisplayMode, AreaAnalyticsHeightConfig, AreaAnalyticsMetricConfig, AreaAnalyticsMetricFilter, AreaAnalyticsRegionPolygonConfig, AreaAnalyticsValueType, AvailabilityLevel, BeforeLayerConfig, BespokeSectionType, ByIdOrIndex, CSSCursor, ChargingSpeedIconMapping, ChargingStopIconConfig, ChargingStopIconMapping, ChargingStopTextConfig, ChargingStopsConfig, CleanEventStateOptions, CleanEventStatesOptions, ClickEventType, CountryCrossingAlignment, CountryCrossingConfig, CountryCrossingFeature, CustomImage, DefaultPlaceIconConfig, DisplayCountryCrossing, DisplayCountryCrossingProps, DisplayCountryCrossings, DisplayRouteProps, DisplayRouteRelatedProps, DisplayRouteSummaries, DisplayRouteSummary, DisplayRouteSummaryProps, DrawnSectionType, EVAvailabilityConfig, EventHandlerConfig, EventHandlerCursorConfig, EventType, ExtraFeatureProp, FeaturePropValue, FilterShowMode, FilterablePOICategory, GeneratedSectionType, GeoJSONSourcesWithLayers, HasAdditionalLayersConfig, HasBeforeID, HillshadeModuleConfig, HoverEventType, IncidentFocusStyle, LayerSpecFilter, LayerSpecTemplate, LayerSpecWithSource, LightDark, MapColorName, MapColors, MapEventsConfig, MapFont, MapModuleCommonConfig, MapStyleLayerID, POIsModuleConfig, POIsModuleFeature, PlaceConnectionDisplay, PlaceConnectionLayerName, PlaceConnectionsConfig, PlaceConnectionsLayersConfig, PlaceIconConfig, PlaceLayerName, PlaceLayersConfig, PlaceTextConfig, PlacesModuleConfig, PlacesTheme, PlanningWaypoint, PutEventStateOptions, RGBAColor, RouteLayersConfig, RouteStateProps, RouteTheme, RouteWaypointSize, RouteWidth, RoutingModuleConfig, SVGIconStyleOptions, SectionDisplayConfig, SectionDrawStyle, SectionIconConfig, SectionKnobName, SectionKnobOf, SectionLineLayerName, SectionLinePattern, SectionSignConfig, SectionSignLayerName, SectionSignPlacement, SectionSignPriority, SectionSignUnit, SectionSourceKey, SectionSymbolLayerName, SectionsDisplayConfig, SourceWithLayerIDs, SourceWithLayers, SourcesWithLayers, StyleSourcesWithLayers, StylingCatalogue, StylingColorKnobId, StylingKnobAppliesTo, StylingKnobDescriptor, StylingKnobId, StylingKnobKind, StylingKnobRange, StylingKnobValue, StylingKnobValueOf, StylingPresetDescriptor, StylingPresetId, StylingSettings, SupportsEvents, SymbolLayerSpecWithoutSource, TRAFFIC_LIGHT_COLORS, ToBeAddedLayerSpec, ToBeAddedLayerSpecTemplate, ToBeAddedLayerSpecWithoutSource, TrafficAreaAnalyticsConfig, TrafficIncidentOverlayConfig, UserEventHandler, ValuesFilter, WaypointsConfig };
14385
+ export type { AREA_ANALYTICS_DEFAULTS, AreaAnalyticsBeforeLayerConfig, AreaAnalyticsColorStop, AreaAnalyticsColorStopsConfig, AreaAnalyticsColorTheme, AreaAnalyticsDisplayMode, AreaAnalyticsHeightConfig, AreaAnalyticsMetricConfig, AreaAnalyticsMetricFilter, AreaAnalyticsRegionPolygonConfig, AreaAnalyticsValueType, AvailabilityLevel, BeforeLayerConfig, BespokeSectionType, ByIdOrIndex, CSSCursor, ChargingSpeedIconMapping, ChargingStopIconConfig, ChargingStopIconMapping, ChargingStopTextConfig, ChargingStopsConfig, CleanEventStateOptions, CleanEventStatesOptions, ClickEventType, CountryCrossingAlignment, CountryCrossingConfig, CountryCrossingFeature, CustomImage, DefaultPlaceIconConfig, DisplayCountryCrossing, DisplayCountryCrossingProps, DisplayCountryCrossings, DisplayRouteProps, DisplayRouteRelatedProps, DisplayRouteSummaries, DisplayRouteSummary, DisplayRouteSummaryProps, DrawnSectionType, EVAvailabilityConfig, EventHandlerConfig, EventHandlerCursorConfig, EventHandlerHoverConfig, EventState, EventType, ExtraFeatureProp, FeaturePropValue, FilterablePOICategory, GeneratedSectionType, GeoJSONSourcesWithLayers, HasAdditionalLayersConfig, HasBeforeID, HoverEventType, HslColor, IncidentFocusStyle, LayerQuery, LayerSpecFilter, LayerSpecTemplate, LayerSpecWithSource, LightDark, MapColorName, MapColors, MapEventsConfig, MapFont, MapModuleCommonConfig, MapStyleLayerID, POIsModuleConfig, POIsModuleFeature, PlaceConnectionDisplay, PlaceConnectionLayerName, PlaceConnectionsConfig, PlaceConnectionsLayersConfig, PlaceEntryPointFeature, PlaceEntryPointProps, PlaceEntryPointsConfig, PlaceEntryPointsLayersConfig, PlaceEntryPointsShowFor, PlaceIconConfig, PlaceLayerName, PlaceLayersConfig, PlaceTextConfig, PlacesModuleConfig, PlacesTheme, PlanningWaypoint, PutEventStateOptions, RGBAColor, RouteLayersConfig, RouteStateProps, RouteTheme, RouteWaypointSize, RouteWidth, RoutingModuleConfig, SVGIconStyleOptions, SectionDisplayConfig, SectionDrawStyle, SectionIconConfig, SectionKnobName, SectionKnobOf, SectionLineLayerName, SectionLinePattern, SectionSignConfig, SectionSignLayerName, SectionSignPlacement, SectionSignPriority, SectionSignUnit, SectionSourceKey, SectionSymbolLayerName, SectionsDisplayConfig, SourceWithLayerIDs, SourceWithLayers, SourcesWithLayers, StyleSourcesWithLayers, StylingColorKnobId, StylingKnob, StylingKnobAppliesTo, StylingKnobId, StylingKnobKind, StylingKnobRange, StylingKnobValue, StylingKnobValueOf, StylingPreset, StylingPresetId, StylingSettings, SupportsEvents, SymbolLayerSpecWithoutSource, TRAFFIC_LIGHT_COLORS, TerrainModuleConfig, ToBeAddedLayerSpec, ToBeAddedLayerSpecTemplate, ToBeAddedLayerSpecWithoutSource, TrafficAreaAnalyticsModuleConfig, TrafficIncidentOverlayModuleConfig, UserEventHandler, WaypointsConfig };