@tomtom-org/maps-sdk 1.0.0-rc.0 → 1.0.0-rc.2

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.
@@ -400,6 +400,9 @@ type TomTomMapParams = Partial<GlobalConfig> & {
400
400
  * MapLibre keeps its own worker lookup if you already called its `setWorkerUrl`, if MapLibre loads unbundled
401
401
  * (from a CDN or an import map), and under bundlers that build classic workers or none, as webpack does by
402
402
  * default and Rollup and esbuild do.
403
+ * Next.js with Turbopack emits neither the worker nor `maplibre-gl-shared.mjs`, which the worker imports
404
+ * beside itself. Copy both from `maplibre-gl/dist/` into one `public/` directory and call `setWorkerUrl`
405
+ * before creating the map.
403
406
  * Pass `false` to keep MapLibre's lookup in every case.
404
407
  *
405
408
  * @default true
@@ -461,7 +464,7 @@ type InternalTomTomMapParams = GlobalConfig & TomTomMapParams;
461
464
  * // Default: on top of the map, below the geometry titles
462
465
  * const geometriesModule = await GeometriesModule.create(map);
463
466
  *
464
- * // Custom: below buildings to show at ground level
467
+ * // Custom: under the building footprints and the whole road network
465
468
  * const geometriesModule = await GeometriesModule.create(map, {
466
469
  * beforeLayerConfig: 'lowestBuilding'
467
470
  * });
@@ -507,8 +510,8 @@ export declare const mapStyleLayerIDs: {
507
510
  * Country name label layer.
508
511
  *
509
512
  * @remarks
510
- * It sits lower in the stack than most labels. Use it to position elements below country
511
- * labels but above other map features.
513
+ * It sits above every other place label and the POIs; only the traffic incident markers are
514
+ * higher. Use it to position content below country labels but above every other label.
512
515
  */
513
516
  readonly country: "Places - Country name";
514
517
  /**
@@ -538,7 +541,8 @@ export declare const mapStyleLayerIDs: {
538
541
  * - ReachableRangesModule, PlacesModule connections and TrafficIncidentDetailsModule
539
542
  * - TrafficAreaAnalyticsModule heatmap and 2D modes
540
543
  *
541
- * It balances visibility against obscuring map labels.
544
+ * It balances visibility against obscuring map labels. The 3D buildings sit directly above it,
545
+ * so content positioned before it also stays under them, and above the roads.
542
546
  */
543
547
  readonly lowestLabel: "Borders - Treaty label";
544
548
  /**
@@ -552,11 +556,12 @@ export declare const mapStyleLayerIDs: {
552
556
  */
553
557
  readonly lowestRoadLine: "Tunnel - Railway outline";
554
558
  /**
555
- * The lowest building layer in the stack.
559
+ * The lowest building layer in the stack, and the lowest of these anchors.
556
560
  *
557
561
  * @remarks
558
- * Use it to position content below 3D building extrusions while keeping it above
559
- * flat map features like roads and terrain.
562
+ * It holds the underground buildings, under the 2D building footprints and the whole road
563
+ * network. Use it to position content below buildings, roads and labels while keeping it above
564
+ * land cover and water. To stay above the roads but below the 3D buildings, use `lowestLabel`.
560
565
  *
561
566
  * **Note:** Not available in the Satellite style.
562
567
  */
@@ -1871,7 +1876,10 @@ export declare const DEFAULT_TEXT_SIZE: ExpressionSpecification;
1871
1876
  * All font faces available in the TomTom map style.
1872
1877
  *
1873
1878
  * @remarks
1874
- * Use it to select or validate fonts when creating custom layers.
1879
+ * Use it to select or validate fonts when creating custom layers. The `Noto-*` faces draw every
1880
+ * script the map labels in. The `NotoSerif-*` faces draw no Arabic, and the `NotoSans-*Italic`
1881
+ * faces only Latin, Greek and Cyrillic, so end a stack that names one with the `Noto-*` face of the
1882
+ * same weight.
1875
1883
  *
1876
1884
  * @example
1877
1885
  * ```typescript
@@ -1893,7 +1901,7 @@ export declare const DEFAULT_TEXT_SIZE: ExpressionSpecification;
1893
1901
  *
1894
1902
  * @group Map Style
1895
1903
  */
1896
- export declare const mapFonts: readonly ["Noto-Regular", "NotoSans-MediumItalic", "Noto-Bold", "Noto-Medium"];
1904
+ export declare const mapFonts: readonly ["Noto-Regular", "NotoSans-MediumItalic", "Noto-Bold", "Noto-Medium", "NotoSans-RegularItalic", "NotoSans-BoldItalic", "NotoSerif-Regular", "NotoSerif-Medium", "NotoSerif-Bold", "NotoSerif-RegularItalic", "NotoSerif-MediumItalic", "NotoSerif-BoldItalic"];
1897
1905
  /**
1898
1906
  * A font face available in the TomTom map style.
1899
1907
  *
@@ -1922,11 +1930,98 @@ export declare const mapFonts: readonly ["Noto-Regular", "NotoSans-MediumItalic"
1922
1930
  * @group Map Style
1923
1931
  */
1924
1932
  type MapFont = (typeof mapFonts)[number];
1933
+ /**
1934
+ * The typefaces the map's labels can be set in, as the `labels.typeface` knob of
1935
+ * {@link stylingFoundationsKnobCatalogue} takes them. A module's own labels take them in their
1936
+ * `typeface` too. `sans` is the style's own.
1937
+ *
1938
+ * @group Map Style
1939
+ */
1940
+ export declare const mapTypefaces: readonly ["sans", "sans-italic", "serif", "serif-italic"];
1941
+ /**
1942
+ * A typeface the map's labels can be set in. See {@link mapTypefaces}.
1943
+ *
1944
+ * @group Map Style
1945
+ */
1946
+ type MapTypeface = (typeof mapTypefaces)[number];
1947
+ //#endregion
1948
+ //#region src/shared/types/typeface.d.ts
1949
+ /**
1950
+ * One font file of a {@link CustomTypeface} and the characters it draws, for a face split into files by
1951
+ * script, as font CDNs serve them.
1952
+ *
1953
+ * @group Shared
1954
+ */
1955
+ type CustomTypefaceFile = {
1956
+ /** The file's URL, to a format the browser draws text with, such as WOFF2 or TTF. */
1957
+ url: string;
1958
+ /**
1959
+ * The characters the file draws, as CSS `unicode-range` values such as `U+0100-02BA`. List only the
1960
+ * ones the file has. A character in the range that the file lacks is drawn in the browser's default
1961
+ * sans-serif.
1962
+ */
1963
+ unicodeRange: string[];
1964
+ };
1965
+ /**
1966
+ * A typeface of your own for map labels, from font files you host or load from a font CDN. The SDK
1967
+ * ships no font, and the map fetches these files itself. Set it for every label on the map through
1968
+ * {@link StylingFoundationsModule}, or for one module's labels through their `customTypeface`.
1969
+ *
1970
+ * Give each weight one file URL, drawing the characters in `unicodeRange`, or a list of
1971
+ * {@link CustomTypefaceFile}s with a range each, such as a font CDN's `latin` and `latin-ext` files.
1972
+ *
1973
+ * @remarks
1974
+ * - Each label keeps its weight and slant. A weight with no file takes the file of the nearest weight
1975
+ * given, and an italic with none takes the upright file of its weight.
1976
+ * - Characters outside the files' ranges, and every character of a file that fails to load, are drawn
1977
+ * in the style's own Noto face of the same weight. MapLibre logs a console warning for each file
1978
+ * that fails, with its URL and the reason.
1979
+ * - The browser draws the files' text one character cluster at a time. A script whose letters join or
1980
+ * reorder, such as Arabic or Devanagari, reads best left to the style's faces, outside the ranges.
1981
+ *
1982
+ * @example
1983
+ * ```typescript
1984
+ * const fraunces = 'https://cdn.jsdelivr.net/fontsource/fonts/fraunces@5/latin';
1985
+ * await StylingFoundationsModule.get(map, {
1986
+ * labels: {
1987
+ * customTypeface: {
1988
+ * regular: `${fraunces}-400-normal.woff2`,
1989
+ * bold: `${fraunces}-700-normal.woff2`,
1990
+ * regularItalic: `${fraunces}-400-italic.woff2`,
1991
+ * },
1992
+ * },
1993
+ * });
1994
+ * ```
1995
+ *
1996
+ * @group Shared
1997
+ */
1998
+ type CustomTypeface = {
1999
+ /** The regular weight, which a weight with no file of its own falls back to. */
2000
+ regular: string | CustomTypefaceFile[];
2001
+ /** The medium weight. */
2002
+ medium?: string | CustomTypefaceFile[];
2003
+ /** The bold weight. */
2004
+ bold?: string | CustomTypefaceFile[];
2005
+ /** The regular italic. */
2006
+ regularItalic?: string | CustomTypefaceFile[];
2007
+ /** The medium italic. */
2008
+ mediumItalic?: string | CustomTypefaceFile[];
2009
+ /** The bold italic. */
2010
+ boldItalic?: string | CustomTypefaceFile[];
2011
+ /**
2012
+ * The characters the files given as a plain URL draw, listed as in
2013
+ * {@link CustomTypefaceFile.unicodeRange}.
2014
+ *
2015
+ * Default: the characters of the `latin` files that Fontsource and Google Fonts serve, which are
2016
+ * Basic Latin, Latin-1 and the common punctuation.
2017
+ */
2018
+ unicodeRange?: string[];
2019
+ };
1925
2020
  //#endregion
1926
2021
  //#region src/shared/types/labelConfig.d.ts
1927
2022
  /**
1928
- * How a module's text labels look. Sizes and widths are in pixels, and every field also takes a
1929
- * MapLibre expression.
2023
+ * How a module's text labels look. Sizes and widths are in pixels, and every field but the two
2024
+ * typefaces also takes a MapLibre expression.
1930
2025
  *
1931
2026
  * @group Shared
1932
2027
  */
@@ -1941,8 +2036,21 @@ type LabelConfig = {
1941
2036
  haloWidth?: DataDrivenPropertyValueSpecification<number>;
1942
2037
  /** Text opacity, 0 (transparent) to 1 (opaque). */
1943
2038
  opacity?: DataDrivenPropertyValueSpecification<number>;
1944
- /** Font faces. The first available one wins. */
2039
+ /**
2040
+ * Font faces. The first available one wins. Leave it out to keep the module's own face, set in the
2041
+ * labels' typeface.
2042
+ */
1945
2043
  font?: DataDrivenPropertyValueSpecification<MapFont[]>;
2044
+ /**
2045
+ * Typeface of these labels alone, each keeping its weight. Leave it out and they follow the map's
2046
+ * typeface, which {@link StylingFoundationsModule} sets. A `customTypeface` or a `font` wins over it.
2047
+ */
2048
+ typeface?: MapTypeface;
2049
+ /**
2050
+ * A typeface of your own font files for these labels alone. It wins over `typeface`, and a `font`
2051
+ * wins over it.
2052
+ */
2053
+ customTypeface?: CustomTypeface;
1946
2054
  };
1947
2055
  /**
1948
2056
  * A {@link LabelConfig} that also sets what the label says, for the labels a module writes beside
@@ -2224,8 +2332,11 @@ declare abstract class AbstractEventProxy {
2224
2332
  */
2225
2333
  protected sourceWithLayersFor(layerId: string | undefined): SourceWithLayers | undefined;
2226
2334
  /**
2227
- * Updates the given sourcesWithLayers, if they have any handlers.
2228
- * * (This is typically called to refresh any registered, stale sourceWithLayers references after a map style has changed).
2335
+ * Re-files the owner's handlers over the current layers of the given sources, when that owner has handlers.
2336
+ *
2337
+ * A style change, and a layer added or removed afterwards, both leave the filed layer ids stale. MapLibre
2338
+ * answers a rendered-features query that names a missing layer with nothing, so one stale id blanks every
2339
+ * module's events.
2229
2340
  * @param sourcesWithLayers The new sources with layers to replace existing ones.
2230
2341
  * @param owner The module whose sources these are. Only its own handlers are refreshed: two
2231
2342
  * modules can share one MapLibre source ID, so the ID alone cannot tell them apart.
@@ -2386,23 +2497,27 @@ type StylingFoundationsKnob = KnobEntry<StylingFoundationsKnobId, StylingFoundat
2386
2497
  appliesTo: StylingFoundationsKnobAppliesTo;
2387
2498
  };
2388
2499
  /**
2389
- * A serializable set of styling knob values, as {@link StylingFoundationsModule.getConfig} returns and
2390
- * {@link StylingFoundationsModule.applyConfig} accepts. Persist it, put it in a pull request or ship it in a
2391
- * preset. Re-applying it on a later SDK version keeps working for as long as the knob ids do.
2500
+ * The styling settings, as {@link StylingFoundationsModule.getConfig} returns and
2501
+ * {@link StylingFoundationsModule.applyConfig} accepts. Each knob id is its path in here, so the
2502
+ * `view.sky.color` knob is `config.view.sky.color`. It's plain JSON, so persist it, diff it or ship it.
2503
+ * `labels.customTypeface` is the one setting that isn't a knob, since no knob kind takes font files.
2504
+ * While set, it wins over the `labels.typeface` knob.
2392
2505
  *
2393
2506
  * @example
2394
2507
  * ```typescript
2395
2508
  * const settings: StylingFoundationsModuleConfig = {
2396
- * 'labels.sizeFactor': 1.2,
2397
- * 'colors.water': '#7cc4e8',
2398
- * 'view.projection': 'globe',
2509
+ * labels: { sizeFactor: 1.2 },
2510
+ * colors: { water: '#7cc4e8' },
2511
+ * view: { projection: 'globe' },
2399
2512
  * };
2400
2513
  * styling.applyConfig(settings);
2401
2514
  * ```
2402
2515
  *
2403
2516
  * @group Map Styling
2404
2517
  */
2405
- type StylingFoundationsModuleConfig = MapModuleCommonConfig & { [K in StylingFoundationsKnobId]?: StylingFoundationsKnobValueOf<K>; };
2518
+ type StylingFoundationsModuleConfig = MapModuleCommonConfig & KnobConfigOf<{ [ID in StylingFoundationsKnobId]: StylingFoundationsKnobValueOf<ID>; }> & {
2519
+ labels?: Pick<LabelConfig, 'customTypeface'>;
2520
+ };
2406
2521
  //#endregion
2407
2522
  //#region src/styling/knobCatalogue.d.ts
2408
2523
  type KnobDefinitionOf<KIND extends StylingFoundationsKnobKind> = Omit<KnobEntry<string, KIND>, 'id' | 'default'> & {
@@ -2463,6 +2578,12 @@ declare const knobDefinitions: {
2463
2578
  readonly 'labels.sizeFactor': KnobDefinitionOf<"factor">;
2464
2579
  readonly 'symbols.sizeFactor': KnobDefinitionOf<"factor">;
2465
2580
  readonly 'roads.widthFactor': KnobDefinitionOf<"factor">;
2581
+ readonly 'labels.typeface': {
2582
+ readonly kind: "enum";
2583
+ readonly description: "Typeface of every map label, each keeping its weight. The SDK's own labels follow it unless their module sets a typeface or a `font` of its own. The serif and italic faces lack some scripts, which the style's own face draws instead. A `labels.customTypeface` of your own font files, set through the module's config, wins over it.";
2584
+ readonly options: readonly ["sans", "sans-italic", "serif", "serif-italic"];
2585
+ readonly appliesTo: "tomtom-styles";
2586
+ };
2466
2587
  };
2467
2588
  /**
2468
2589
  * The id of a styling knob. {@link stylingFoundationsKnobCatalogue} describes what each one does.
@@ -3010,6 +3131,13 @@ export type KnobRange = {
3010
3131
  * @group Shared
3011
3132
  */
3012
3133
  export type KnobValueOf<KIND extends KnobKind> = KIND extends 'toggle' ? boolean : KIND extends 'factor' | 'number' ? number : KIND extends 'offset' ? readonly [x: number, y: number] : KIND extends 'colors' | 'enums' ? readonly string[] : string;
3134
+ type KnobIdHead<ID extends string> = ID extends `${infer HEAD}.${string}` ? HEAD : ID;
3135
+ /**
3136
+ * The configuration a catalogue's knobs are paths into, for a catalogue declared before its
3137
+ * configuration: `{ 'view.sky.color': string }` gives `{ view?: { sky?: { color?: string } } }`.
3138
+ * @ignore
3139
+ */
3140
+ export type KnobConfigOf<VALUES> = { [HEAD in KnobIdHead<keyof VALUES & string>]?: HEAD extends keyof VALUES ? VALUES[HEAD] : KnobConfigOf<{ [ID in keyof VALUES & string as ID extends `${HEAD}.${infer REST}` ? REST : never]: VALUES[ID]; }>; };
3013
3141
  /**
3014
3142
  * A knob catalogue entry, with what a UI or a coding agent needs to offer a knob and validate its
3015
3143
  * values with no map loaded. A catalogue may add fields of its own.
@@ -3044,10 +3172,9 @@ export type KnobEntry<ID extends string, KIND extends KnobKind = KnobKind> = KIN
3044
3172
  //#endregion
3045
3173
  //#region src/shared/knobUtils.d.ts
3046
3174
  /**
3047
- * The value at a dotted path into T, or `never` where the path names nothing. A path that is a key
3048
- * of T as a whole names that key, as the flat ids of `StylingFoundationsModuleConfig` do. A union is read member by
3049
- * member, so `highlight.line.widthFactor` resolves through `false | IncidentHighlightConfig`. No path reaches
3050
- * into a list.
3175
+ * The value at a dotted path into T, or `never` where the path names nothing. A union is read member
3176
+ * by member, so `highlight.line.widthFactor` resolves through `false | IncidentHighlightConfig`. No
3177
+ * path reaches into a list.
3051
3178
  * @ignore
3052
3179
  */
3053
3180
  type ValueAt<T, PATH extends string> = T extends unknown ? PATH extends keyof T ? NonNullable<T[PATH]> : PATH extends `${infer HEAD}.${infer REST}` ? HEAD extends keyof T ? ValueAt<NonNullable<T[HEAD]>, REST> : never : never : never;
@@ -4008,12 +4135,12 @@ type PlacesModuleSerializableConfig = Omit<PlacesModuleConfig, 'label' | 'icon'
4008
4135
  * `cluster.badge.color`. See {@link placesKnobCatalogue} for what each one does.
4009
4136
  *
4010
4137
  * @remarks
4011
- * Only plain-value settings are knobs. `label.title`, `cluster.source.properties`,
4138
+ * Only plain-value settings are knobs. `label.title`, `label.customTypeface`, `cluster.source.properties`,
4012
4139
  * `connections.label.title` and anything holding an image, a callback or MapLibre layers are not.
4013
4140
  *
4014
4141
  * @group Places
4015
4142
  */
4016
- type PlacesKnobId = 'markerType' | 'color' | 'visible' | `icon.default.style.${keyof SVGIconStyleOptions}` | `label.${Exclude<keyof PlaceLabelConfig, 'title'>}` | `cluster.badge.${Exclude<keyof PlaceClusterBadgeConfig, 'radius' | 'label'>}` | `cluster.badge.label.${keyof NonNullable<PlaceClusterBadgeConfig['label']>}` | `cluster.badge.radius.${keyof NonNullable<PlaceClusterBadgeConfig['radius']>}` | `cluster.source.${Exclude<keyof NonNullable<PlacesClusterConfig['source']>, 'properties'>}` | `entryPoints.${Exclude<keyof PlaceEntryPointsConfig, 'layers'>}` | `connections.${Exclude<keyof PlaceConnectionsConfig, 'label' | 'layers'>}` | `connections.label.${Exclude<keyof PlaceConnectionLabelConfig, 'title'>}`;
4143
+ type PlacesKnobId = 'markerType' | 'color' | 'visible' | `icon.default.style.${keyof SVGIconStyleOptions}` | `label.${Exclude<keyof PlaceLabelConfig, 'title' | 'customTypeface'>}` | `cluster.badge.${Exclude<keyof PlaceClusterBadgeConfig, 'radius' | 'label'>}` | `cluster.badge.label.${keyof NonNullable<PlaceClusterBadgeConfig['label']>}` | `cluster.badge.radius.${keyof NonNullable<PlaceClusterBadgeConfig['radius']>}` | `cluster.source.${Exclude<keyof NonNullable<PlacesClusterConfig['source']>, 'properties'>}` | `entryPoints.${Exclude<keyof PlaceEntryPointsConfig, 'layers'>}` | `connections.${Exclude<keyof PlaceConnectionsConfig, 'label' | 'layers'>}` | `connections.label.${Exclude<keyof PlaceConnectionLabelConfig, 'title'>}`;
4017
4144
  /**
4018
4145
  * The value type a given places knob takes, the plain value its path holds in
4019
4146
  * {@link PlacesModuleConfig}. The MapLibre expressions the config also takes there are not knob
@@ -5011,11 +5138,11 @@ type POIsKnob = KnobEntry<POIsKnobId, 'toggle' | 'enum' | 'enums' | 'factor' | '
5011
5138
  */
5012
5139
  type MapPresetSettings = {
5013
5140
  /** {@link StylingFoundationsModule} knobs, from {@link stylingFoundationsKnobCatalogue}. */
5014
- stylingFoundations?: Omit<StylingFoundationsModuleConfig, 'events'>;
5141
+ stylingFoundations?: KnobValues<StylingFoundationsModuleConfig, StylingFoundationsKnobId>;
5015
5142
  /** {@link BaseMapModule} knobs, from {@link baseMapKnobCatalogue}. */
5016
- baseMap?: { [ID in BaseMapKnobId]?: BaseMapKnobValueOf<ID>; };
5143
+ baseMap?: KnobValues<BaseMapModuleConfig, BaseMapKnobId>;
5017
5144
  /** {@link POIsModule} knobs, from {@link poisKnobCatalogue}. */
5018
- pois?: { [ID in POIsKnobId]?: POIsKnobValueOf<ID>; };
5145
+ pois?: KnobValues<POIsModuleConfig, POIsKnobId>;
5019
5146
  };
5020
5147
  type PresetDefinition = {
5021
5148
  name: string;
@@ -5165,8 +5292,9 @@ export type StylingFoundationsEvents = CombinedEvents<MapGeoJSONFeature, Styling
5165
5292
  * It is the tier between showing or hiding a part of the map and hand-editing MapLibre layers. Every
5166
5293
  * adjustable thing is a **knob** with a stable id, a kind, a range and a default read from the loaded
5167
5294
  * style. The ids form the {@link StylingFoundationsKnobId} union, and {@link stylingFoundationsKnobCatalogue} lists
5168
- * each one's kind, range and description as data, with no map needed to read it. {@link setKnob},
5169
- * {@link getKnob} and {@link resetKnob} set, read and unset a knob by its id, as on every module.
5295
+ * each one's kind, range and description as data, with no map needed to read it. Each id is its path
5296
+ * into {@link StylingFoundationsModuleConfig}. {@link setKnob}, {@link setKnobs}, {@link getKnob} and
5297
+ * {@link resetKnob} set, read and unset knobs by id, as on every module.
5170
5298
  *
5171
5299
  * @remarks
5172
5300
  * The catalogue's `appliesTo` says which styles a knob works on. `any-style` knobs (sizes, widths)
@@ -5186,11 +5314,10 @@ export type StylingFoundationsEvents = CombinedEvents<MapGeoJSONFeature, Styling
5186
5314
  *
5187
5315
  * @example
5188
5316
  * ```typescript
5189
- * import { getKnob, setKnob, StylingFoundationsModule, stylingFoundationsKnobCatalogue } from '@tomtom-org/maps-sdk/map';
5317
+ * import { getKnob, setKnobs, StylingFoundationsModule, stylingFoundationsKnobCatalogue } from '@tomtom-org/maps-sdk/map';
5190
5318
  *
5191
5319
  * const styling = await StylingFoundationsModule.get(map);
5192
- * setKnob(styling, stylingFoundationsKnobCatalogue, 'labels.sizeFactor', 1.2);
5193
- * setKnob(styling, stylingFoundationsKnobCatalogue, 'colors.water', '#7cc4e8');
5320
+ * setKnobs(styling, stylingFoundationsKnobCatalogue, { 'labels.sizeFactor': 1.2, 'colors.water': '#7cc4e8' });
5194
5321
  *
5195
5322
  * // The catalogue as data, and each knob's value in force:
5196
5323
  * for (const knob of stylingFoundationsKnobCatalogue) {
@@ -5223,7 +5350,7 @@ export declare class StylingFoundationsModule extends AbstractStyleOwnedMapModul
5223
5350
  *
5224
5351
  * @example
5225
5352
  * ```typescript
5226
- * const styling = await StylingFoundationsModule.get(map, { 'labels.sizeFactor': 1.2 });
5353
+ * const styling = await StylingFoundationsModule.get(map, { labels: { sizeFactor: 1.2 } });
5227
5354
  * ```
5228
5355
  */
5229
5356
  static get(map: TomTomMap, settings?: StylingFoundationsModuleConfig): Promise<StylingFoundationsModule>;
@@ -5262,14 +5389,6 @@ export declare class StylingFoundationsModule extends AbstractStyleOwnedMapModul
5262
5389
  * @ignore
5263
5390
  */
5264
5391
  _knobValue(id: string): unknown;
5265
- /**
5266
- * @ignore
5267
- */
5268
- _setKnobValue(id: string, value: unknown): void;
5269
- /**
5270
- * @ignore
5271
- */
5272
- _resetKnobValue(id: string): void;
5273
5392
  /**
5274
5393
  * Recolours the whole base map with up to ten semantic colours in one call, and sets `accent`, the
5275
5394
  * default colour of routes, geometries and places ({@link TomTomMap.mapColors}).
@@ -5306,6 +5425,8 @@ export declare class StylingFoundationsModule extends AbstractStyleOwnedMapModul
5306
5425
  * @remarks
5307
5426
  * It includes whatever the SDK's data modules (places, routes) have on the map. Its tile URLs
5308
5427
  * carry the API key the map was created with, so strip or rotate the key before publishing.
5428
+ * Labels set in a `customTypeface` come out in the style's own Noto faces, since only the SDK can
5429
+ * draw font files beside the glyph service.
5309
5430
  */
5310
5431
  exportStyle(): StyleSpecification;
5311
5432
  /**
@@ -5318,7 +5439,6 @@ export declare class StylingFoundationsModule extends AbstractStyleOwnedMapModul
5318
5439
  * ```
5319
5440
  */
5320
5441
  get events(): StylingFoundationsEvents;
5321
- private assertKnob;
5322
5442
  private warnOnce;
5323
5443
  }
5324
5444
  //#endregion
@@ -5460,6 +5580,13 @@ declare const stylingFoundationsStyleKnobs: {
5460
5580
  readonly 'labels.sizeFactor': StyleKnobDefinition<"factor">;
5461
5581
  readonly 'symbols.sizeFactor': StyleKnobDefinition<"factor">;
5462
5582
  readonly 'roads.widthFactor': StyleKnobDefinition<"factor">;
5583
+ readonly 'labels.typeface': {
5584
+ readonly kind: "enum";
5585
+ readonly mechanisms: [{
5586
+ readonly type: "typeface";
5587
+ readonly layers: [LayerSelector];
5588
+ }];
5589
+ };
5463
5590
  };
5464
5591
  //#endregion
5465
5592
  //#region src/styling/styleKnobDefinitions.d.ts
@@ -5526,6 +5653,11 @@ type LayerStyleKnobMechanism =
5526
5653
  {
5527
5654
  type: 'zoomOffset';
5528
5655
  layers: LayerSelector[];
5656
+ } |
5657
+ /** Sets the matched layers' `text-font` in the knob's typeface, each face keeping its weight and slant. */
5658
+ {
5659
+ type: 'typeface';
5660
+ layers: LayerSelector[];
5529
5661
  };
5530
5662
  /**
5531
5663
  * How a {@link StylingFoundationsModule} knob reaches the look of the whole map, through the map-look extension
@@ -6159,6 +6291,7 @@ export declare class TomTomMap {
6159
6291
  private applyStyle;
6160
6292
  private loadIntoMapLibre;
6161
6293
  private isSuperseded;
6294
+ private fitCanvasToContainer;
6162
6295
  private recordStyleLayers;
6163
6296
  /**
6164
6297
  * Whether the loaded style itself declares the layer, as opposed to a module or the caller adding it.
@@ -7108,10 +7241,6 @@ export declare abstract class AbstractMapModule<SOURCES_WITH_LAYERS extends Sour
7108
7241
  * @ignore
7109
7242
  */
7110
7243
  protected sourcesWithLayers: SOURCES_WITH_LAYERS;
7111
- /**
7112
- * @ignore
7113
- */
7114
- protected _sourceAndLayerIDs: Record<keyof SOURCES_WITH_LAYERS, SourceWithLayerIDs>;
7115
7244
  /**
7116
7245
  * @ignore
7117
7246
  */
@@ -7202,6 +7331,10 @@ export declare abstract class AbstractMapModule<SOURCES_WITH_LAYERS extends Sour
7202
7331
  * The given configuration **replaces** the current one
7203
7332
  * rather than being merged into it. To change one part of it, use {@link updateConfig}.
7204
7333
  *
7334
+ * Use it for settings your code writes. It takes every setting, typed, including the ones no knob
7335
+ * covers (layer specs, callbacks, MapLibre expressions), and checks no value at run time. For
7336
+ * settings held as data, from a control, storage or a language model, use {@link setKnobs}.
7337
+ *
7205
7338
  * @example
7206
7339
  * ```typescript
7207
7340
  * // Apply a new configuration
@@ -7223,6 +7356,11 @@ export declare abstract class AbstractMapModule<SOURCES_WITH_LAYERS extends Sour
7223
7356
  * {@link applyConfig}. This works the same on every module, whatever its `applyConfig` does with
7224
7357
  * a whole configuration.
7225
7358
  *
7359
+ * @remarks
7360
+ * Use it for settings your code writes, as {@link applyConfig}: typed, and not checked at run
7361
+ * time. To change nested values and keep the ones beside them, or to set values held as data,
7362
+ * use {@link setKnobs}, which reaches each by its path and checks it.
7363
+ *
7226
7364
  * @param partial - The properties to change.
7227
7365
  *
7228
7366
  * @example
@@ -7328,7 +7466,7 @@ export declare abstract class AbstractMapModule<SOURCES_WITH_LAYERS extends Sour
7328
7466
  /**
7329
7467
  * @ignore
7330
7468
  */
7331
- _setKnobValue(id: string, value: unknown): void;
7469
+ _setKnobValues(values: Readonly<Record<string, unknown>>): void;
7332
7470
  /**
7333
7471
  * @ignore
7334
7472
  */
@@ -7597,6 +7735,13 @@ export declare abstract class AbstractDataOwnedMapModule<SOURCES_WITH_LAYERS ext
7597
7735
  * ```
7598
7736
  */
7599
7737
  getEventStates(): EventStateIds;
7738
+ /**
7739
+ * Swaps the layers of one of this module's sources for `newSpecs`, then re-files this module's
7740
+ * event handlers over the layers it now has. See {@link AbstractEventProxy.updateIfRegistered}.
7741
+ * @protected
7742
+ * @ignore
7743
+ */
7744
+ protected replaceSourceLayers(newSpecs: ToBeAddedLayerSpecWithoutSource[], oldSpecs: ToBeAddedLayerSpecWithoutSource[], source: GeoJSONSourceWithLayers): void;
7600
7745
  }
7601
7746
  //#endregion
7602
7747
  //#region src/shared/layers/layerVisibilityComposer.d.ts
@@ -7686,8 +7831,8 @@ export declare abstract class AbstractStyleOwnedMapModule<SOURCES_WITH_LAYERS ex
7686
7831
  */
7687
7832
  export declare const validateKnobValue: (knob: KnobEntry<string>, value: unknown) => void;
7688
7833
  /**
7689
- * What {@link setKnob}, {@link getKnob} and {@link resetKnob} act on, which is every map module
7690
- * and any plugin with knobs of its own, such as the map-effects plugin's `MapEffects`.
7834
+ * What {@link setKnob}, {@link setKnobs}, {@link getKnob} and {@link resetKnob} act on, which is
7835
+ * every map module and any plugin with knobs of its own, such as the map-effects plugin's `MapEffects`.
7691
7836
  *
7692
7837
  * @group Shared
7693
7838
  */
@@ -7696,12 +7841,44 @@ export type KnobTarget<CONFIG> = {
7696
7841
  /** @ignore */
7697
7842
  _knobValue(id: string): unknown;
7698
7843
  /** @ignore */
7699
- _setKnobValue(id: string, value: unknown): void;
7844
+ _setKnobValues(values: Readonly<Record<string, unknown>>): void;
7700
7845
  /** @ignore */
7701
7846
  _resetKnobValue(id: string): void;
7702
7847
  };
7848
+ /**
7849
+ * The value at a knob id's dotted path into a configuration. With {@link configWithKnobs} and
7850
+ * {@link configWithoutKnob}, it is what every {@link KnobTarget}'s hooks are made of.
7851
+ * @ignore
7852
+ */
7853
+ export declare const knobValueIn: (config: unknown, id: string) => unknown;
7854
+ /**
7855
+ * The configuration with each value at its knob id's path, keeping the settings beside it. Each
7856
+ * object along a path is copied, so the configuration passed in is left as it was.
7857
+ * @ignore
7858
+ */
7859
+ export declare const configWithKnobs: <CONFIG extends object>(config: CONFIG, values: Readonly<Record<string, unknown>>) => CONFIG;
7860
+ /**
7861
+ * The configuration without the value at a knob id's path, dropping each object that leaves empty.
7862
+ * @ignore
7863
+ */
7864
+ export declare const configWithoutKnob: <CONFIG extends object>(config: CONFIG, id: string) => CONFIG;
7703
7865
  type KnobInput<CONFIG, KNOB extends string> = string extends KNOB ? unknown : KnobPlainValue<ValueAt<CONFIG, KNOB>>;
7704
7866
  type KnobOutput<CONFIG, KNOB extends string> = string extends KNOB ? unknown : ValueAt<CONFIG, KNOB> | undefined;
7867
+ /**
7868
+ * Knob values by id, as {@link setKnobs} takes them: a flat, JSON-safe record to store, ship as a
7869
+ * preset or take from a language model.
7870
+ *
7871
+ * @typeParam CONFIG - The module's configuration, which types each value by its knob's path.
7872
+ * @typeParam ID - The knob ids of its catalogue. Any `string` takes any value, checked when set.
7873
+ *
7874
+ * @example
7875
+ * ```typescript
7876
+ * const saved: KnobValues<RoutingModuleConfig, RoutingKnobId> = { widthPreset: 'l', 'waypoints.label.color': '#e63312' };
7877
+ * ```
7878
+ *
7879
+ * @group Shared
7880
+ */
7881
+ export type KnobValues<CONFIG, ID extends string> = { readonly [KNOB in ID]?: KnobInput<CONFIG, KNOB>; };
7705
7882
  /**
7706
7883
  * A knob's entry in its catalogue: its kind, range or options, default and description.
7707
7884
  *
@@ -7721,8 +7898,12 @@ export declare const knobEntryOf: <ENTRY extends KnobEntry<string>>(catalogue: r
7721
7898
  *
7722
7899
  * @remarks
7723
7900
  * Nothing changes when the value is invalid. A knob's id is its dotted path into the module's
7724
- * configuration, or its key there for `StylingFoundationsModule`. The change therefore also shows
7725
- * in `getConfig` and fires a `config-change` event.
7901
+ * configuration, so the change also shows in `getConfig` and fires a `config-change` event. To
7902
+ * set several knobs in one change, use {@link setKnobs}.
7903
+ *
7904
+ * Use it for a value held as data, from a control, storage or a language model, since it checks the
7905
+ * value and keeps the settings beside it. For typed settings your code writes, including the ones no
7906
+ * knob covers, use the module's `applyConfig` or `updateConfig`, which check nothing at run time.
7726
7907
  *
7727
7908
  * @param module - A map module, or a plugin with knobs, such as `MapEffects`.
7728
7909
  * @param catalogue - Its knob catalogue, e.g. `trafficFlowKnobCatalogue` for a `TrafficFlowModule`.
@@ -7738,6 +7919,37 @@ export declare const knobEntryOf: <ENTRY extends KnobEntry<string>>(catalogue: r
7738
7919
  * @group Shared
7739
7920
  */
7740
7921
  export declare const setKnob: <CONFIG, ID extends string, KNOB extends ID>(module: KnobTarget<CONFIG>, catalogue: readonly KnobEntry<ID>[], id: KNOB, value: KnobInput<CONFIG, KNOB>) => void;
7922
+ /**
7923
+ * Sets several knobs by their catalogue ids in one change, after checking every value with
7924
+ * {@link validateKnobValue}, and keeps every other setting.
7925
+ *
7926
+ * @remarks
7927
+ * Nothing changes when any id or value is invalid. Otherwise the module applies its configuration
7928
+ * once, so it redraws and fires `config-change` once, however many knobs you set.
7929
+ *
7930
+ * Use the knob functions for settings held as data, and the module's config methods for settings
7931
+ * your code writes:
7932
+ * - `setKnob` / `setKnobs` take ids and values from a control, storage, a URL or a language model.
7933
+ * They check each value, reach a nested setting and keep the ones beside it, and cover the
7934
+ * plain-valued settings the catalogue lists.
7935
+ * - `applyConfig` / `updateConfig` take a typed configuration, including what no knob covers
7936
+ * (layer specs, callbacks, MapLibre expressions). They check nothing at run time, and
7937
+ * `updateConfig` replaces a nested object you pass.
7938
+ *
7939
+ * @param module - A map module, or a plugin with knobs, such as `MapEffects`.
7940
+ * @param catalogue - Its knob catalogue, e.g. `routingKnobCatalogue` for a `RoutingModule`.
7941
+ * @param values - The values by knob id. An empty record changes nothing.
7942
+ * @throws `RangeError` for a value its knob does not take; `Error` for an id the catalogue lacks.
7943
+ *
7944
+ * @example
7945
+ * ```typescript
7946
+ * setKnobs(routing, routingKnobCatalogue, { widthPreset: 'l', 'waypoints.label.color': '#e63312' });
7947
+ * setKnobs(styling, stylingFoundationsKnobCatalogue, JSON.parse(localStorage.getItem('styling') ?? '{}'));
7948
+ * ```
7949
+ *
7950
+ * @group Shared
7951
+ */
7952
+ export declare const setKnobs: <CONFIG, ID extends string>(module: KnobTarget<CONFIG>, catalogue: readonly KnobEntry<ID>[], values: KnobValues<CONFIG, ID>) => void;
7741
7953
  /**
7742
7954
  * Returns the value set for a knob, otherwise the module's own value where it knows it
7743
7955
  * (`StylingFoundationsModule` reads the loaded style), otherwise the catalogue's default.
@@ -9221,6 +9433,7 @@ export declare abstract class AbstractGeometriesModule<CFG extends MapModuleComm
9221
9433
  protected applyVisibility(config: CFG | undefined): void;
9222
9434
  private get partLayerIDs();
9223
9435
  private applyBeforeLayerConfig;
9436
+ private labelLayerSpecs;
9224
9437
  private updateLayers;
9225
9438
  /**
9226
9439
  * @ignore
@@ -9563,17 +9776,17 @@ export declare const fillStyledGeometryConfig: ({ palette, beforeLayerConfig }?:
9563
9776
  //#endregion
9564
9777
  //#region src/geometry/types/geometriesKnobs.d.ts
9565
9778
  /**
9566
- * The style fields both geometry labels share, as knobs: the {@link LabelConfig} fields.
9779
+ * The style fields both geometry labels share, as knobs: the {@link LabelConfig} fields but its font files.
9567
9780
  * @ignore
9568
9781
  */
9569
- type GeometryLabelKnobLeaf = keyof LabelConfig;
9782
+ type GeometryLabelKnobLeaf = Exclude<keyof LabelConfig, 'customTypeface'>;
9570
9783
  /**
9571
9784
  * A geometries knob's id, its path into {@link GeometriesModuleConfig}, such as `fill.opacity` or
9572
9785
  * `lineLabel.minZoom`. See {@link geometriesKnobCatalogue} for what each one does.
9573
9786
  *
9574
9787
  * @group Geometries
9575
9788
  */
9576
- type GeometriesKnobId = 'color' | 'visible' | `fill.${keyof GeometryFillConfig}` | `line.${keyof GeometryLineConfig}` | `highlight.${LeafPathOf<GeometryHighlightConfig>}` | `label.${Exclude<keyof GeometryLabelConfig, 'title'>}` | `lineLabel.${Exclude<keyof GeometryLineLabelConfig, 'title'>}`;
9789
+ type GeometriesKnobId = 'color' | 'visible' | `fill.${keyof GeometryFillConfig}` | `line.${keyof GeometryLineConfig}` | `highlight.${LeafPathOf<GeometryHighlightConfig>}` | `label.${Exclude<keyof GeometryLabelConfig, 'title' | 'customTypeface'>}` | `lineLabel.${Exclude<keyof GeometryLineLabelConfig, 'title' | 'customTypeface'>}`;
9577
9790
  /**
9578
9791
  * The value type of a geometries knob, the plain value its path holds in
9579
9792
  * {@link GeometriesModuleConfig}. The MapLibre expressions the config also takes there are not knob
@@ -11055,6 +11268,25 @@ type RouteLayersConfig = {
11055
11268
  */
11056
11269
  routeCountryCrossing?: Partial<ToBeAddedLayerSpecTemplate<SymbolLayerSpecification>>;
11057
11270
  } & HasAdditionalLayersConfig;
11271
+ /**
11272
+ * Layers of the sections {@link RoutingModule.setSectionFocus} marks.
11273
+ *
11274
+ * @remarks
11275
+ * Anything {@link RouteHighlightConfig} `section` cannot express about the ring.
11276
+ */
11277
+ sectionFocus?: {
11278
+ /**
11279
+ * Line layer ringing each focused section of the selected route, drawn with a
11280
+ * `line-gap-width` as wide as the widest line along the route, so the route and its
11281
+ * sections show through.
11282
+ */
11283
+ routeSectionFocusOutline?: Partial<ToBeAddedLayerSpecTemplate<LineLayerSpecification>>;
11284
+ /**
11285
+ * Line layer ringing each focused section of a deselected route, under the selected
11286
+ * route where they cross.
11287
+ */
11288
+ routeDeselectedSectionFocusOutline?: Partial<ToBeAddedLayerSpecTemplate<LineLayerSpecification>>;
11289
+ } & HasAdditionalLayersConfig;
11058
11290
  };
11059
11291
  /**
11060
11292
  * The waypoint pins, one per role (origin, stops, destination), each in the SDK's pin or an image
@@ -11424,8 +11656,8 @@ type SectionSignConfig = {
11424
11656
  /**
11425
11657
  * The lowest zoom the signs are drawn at.
11426
11658
  *
11427
- * @defaultValue 10, where a sign is about a stretch of road a reader can see. Further out the
11428
- * stretches fall in the same few pixels and the surviving signs are an arbitrary sample.
11659
+ * @defaultValue 11, one zoom past the tunnel and closed-road signs. A route posts many more
11660
+ * speed limits, and further out they crowd the overview of the route.
11429
11661
  */
11430
11662
  minZoom?: number;
11431
11663
  /**
@@ -11525,13 +11757,14 @@ type CountryCrossingLabelConfig = {
11525
11757
  color?: string;
11526
11758
  };
11527
11759
  /**
11528
- * The highlight of a hovered or clicked route, selected or not, which widens its outline in the
11529
- * outline colour.
11760
+ * The highlights the routes draw: a hovered or clicked route widens its outline in the outline
11761
+ * colour, and a focused section is ringed clear of every line the route draws.
11530
11762
  *
11531
11763
  * @remarks
11532
11764
  * The routes draw their event states once a handler covers them, or
11533
11765
  * {@link RoutingModule.setEventState} puts one. A `layers.mainLines` outline `line-width` is drawn
11534
- * as given instead.
11766
+ * as given instead. The sections {@link RoutingModule.setSectionFocus} marks draw the `section`
11767
+ * highlight.
11535
11768
  *
11536
11769
  * @group Routing
11537
11770
  */
@@ -11548,6 +11781,27 @@ type RouteHighlightConfig = {
11548
11781
  */
11549
11782
  widthFactor?: number;
11550
11783
  };
11784
+ /** The focused sections, ringed on both sides of the route without covering what it draws. */
11785
+ section?: {
11786
+ /** The ring, which runs clear of the widest line the route draws: its hovered outline or a section. */
11787
+ outline?: {
11788
+ /**
11789
+ * The ring's colour.
11790
+ *
11791
+ * @defaultValue `#000` on light map styles, `#FFF` on dark styles
11792
+ */
11793
+ color?: string;
11794
+ /**
11795
+ * Multiplier on the ring's width, which grows from 2 to 4 pixels as the zoom grows.
11796
+ *
11797
+ * @remarks
11798
+ * Clamped to 0.5 to 2, its `range` in {@link routingKnobCatalogue}.
11799
+ *
11800
+ * @defaultValue `1`
11801
+ */
11802
+ widthFactor?: number;
11803
+ };
11804
+ };
11551
11805
  };
11552
11806
  /**
11553
11807
  * Appearance of one route section type.
@@ -11780,7 +12034,7 @@ type RoutingModuleSerializableConfig = Omit<RoutingModuleConfig, 'waypoints'> &
11780
12034
  *
11781
12035
  * @group Routing
11782
12036
  */
11783
- type RoutingKnobId = 'visible' | 'color' | 'widthPreset' | 'widthFactor' | `highlight.${LeafPathOf<RouteHighlightConfig>}` | 'waypoints.sizePreset' | 'waypoints.sizeFactor' | `waypoints.icon.style.${keyof SVGIconStyleOptions}` | `waypoints.icon.${WaypointIndexType}.style.${keyof SVGIconStyleOptions}` | 'waypoints.stopNumbering' | `waypoints.label.${Exclude<keyof WaypointLabelConfig, 'title'>}` | `waypoints.highlight.${keyof WaypointHighlightConfig}` | 'waypoints.entryPoints' | `displayUnits.distance.${keyof DistanceDisplayUnits}` | `displayUnits.time.${keyof TimeDisplayUnits}` | 'summaryBubbles.visible' | `countryCrossings.${Exclude<keyof CountryCrossingConfig, 'label'>}` | `countryCrossings.label.${keyof CountryCrossingLabelConfig}` | { [T in DrawnSectionType]: `sections.${T}.${LeafPathOf<SectionDisplayConfig<T>>}`; }[DrawnSectionType];
12037
+ type RoutingKnobId = 'visible' | 'color' | 'widthPreset' | 'widthFactor' | `highlight.outline.${keyof NonNullable<RouteHighlightConfig['outline']>}` | `highlight.section.${LeafPathOf<NonNullable<RouteHighlightConfig['section']>>}` | 'waypoints.sizePreset' | 'waypoints.sizeFactor' | `waypoints.icon.style.${keyof SVGIconStyleOptions}` | `waypoints.icon.${WaypointIndexType}.style.${keyof SVGIconStyleOptions}` | 'waypoints.stopNumbering' | `waypoints.label.${Exclude<keyof WaypointLabelConfig, 'title' | 'customTypeface'>}` | `waypoints.highlight.${keyof WaypointHighlightConfig}` | 'waypoints.entryPoints' | `displayUnits.distance.${keyof DistanceDisplayUnits}` | `displayUnits.time.${keyof TimeDisplayUnits}` | 'summaryBubbles.visible' | `countryCrossings.${Exclude<keyof CountryCrossingConfig, 'label'>}` | `countryCrossings.label.${keyof CountryCrossingLabelConfig}` | { [T in DrawnSectionType]: `sections.${T}.${LeafPathOf<SectionDisplayConfig<T>>}`; }[DrawnSectionType];
11784
12038
  /**
11785
12039
  * The plain value type that a routing knob's path holds in {@link RoutingModuleConfig}.
11786
12040
  *
@@ -12406,6 +12660,7 @@ type RoutingSourcesWithLayers = { [K in SectionSourceKey<GeneratedSectionType>]:
12406
12660
  instructionArrows: GeoJSONSourceWithLayers<DisplayInstructionArrows>;
12407
12661
  summaryBubbles: GeoJSONSourceWithLayers<DisplayRouteSummaries>;
12408
12662
  countryCrossings: GeoJSONSourceWithLayers<DisplayCountryCrossings>;
12663
+ sectionFocus: GeoJSONSourceWithLayers<RouteSections>;
12409
12664
  };
12410
12665
  //#endregion
12411
12666
  //#region src/routing/types/showOptions.d.ts
@@ -12712,7 +12967,7 @@ export declare class RoutingModule extends AbstractDataOwnedMapModule<RoutingSou
12712
12967
  * markers. To show them, call {@link showWaypoints} separately.
12713
12968
  *
12714
12969
  * This method:
12715
- * - Replaces any previously shown routes
12970
+ * - Replaces any previously shown routes, and clears the {@link setSectionFocus} focus
12716
12971
  * - Shows all route-related features: lines, sections, guidance and summary bubbles
12717
12972
  * - Selects the first route by default, which then appears more prominent
12718
12973
  *
@@ -12747,6 +13002,28 @@ export declare class RoutingModule extends AbstractDataOwnedMapModule<RoutingSou
12747
13002
  * ```
12748
13003
  */
12749
13004
  showRoutes(routes: Route | Routes, options?: ShowRoutesOptions): Promise<void>;
13005
+ /**
13006
+ * Rings the given sections of the shown routes, or clears the ring with `null`.
13007
+ *
13008
+ * @param sectionIds - The `id` of each section to focus, from any route shown and of any type,
13009
+ * drawn or not. An id no shown section carries is skipped.
13010
+ *
13011
+ * @remarks
13012
+ * The ring runs on both sides of the route, clear of the widest line it draws, whether its
13013
+ * hovered outline or a section, so the route and every section along it stay in sight. A
13014
+ * deselected route's ring sits under the selected route. {@link RouteHighlightConfig} `section`
13015
+ * styles it. Each call replaces the focus, and {@link showRoutes} clears it.
13016
+ *
13017
+ * @example
13018
+ * ```typescript
13019
+ * // Point out the route's ferry crossings, say while a timeline row hovers them
13020
+ * const ferries = route.properties.sections.ferry ?? [];
13021
+ * await routingModule.setSectionFocus(ferries.map((section) => section.id));
13022
+ *
13023
+ * await routingModule.setSectionFocus(null);
13024
+ * ```
13025
+ */
13026
+ setSectionFocus(sectionIds: readonly string[] | null): Promise<void>;
12750
13027
  /**
12751
13028
  * Clears any previously shown routes from the map.
12752
13029
  *
@@ -12836,6 +13113,7 @@ export declare class RoutingModule extends AbstractDataOwnedMapModule<RoutingSou
12836
13113
  * - `instructionArrows`: Instruction arrow markers
12837
13114
  * - `summaryBubbles`: Route summary popups
12838
13115
  * - `countryCrossings`: Border crossings along the route
13116
+ * - `sectionFocus`: The sections `setSectionFocus()` rings
12839
13117
  *
12840
13118
  * @example
12841
13119
  * ```typescript
@@ -12862,6 +13140,7 @@ export declare class RoutingModule extends AbstractDataOwnedMapModule<RoutingSou
12862
13140
  instructionArrows: DisplayInstructionArrows;
12863
13141
  summaryBubbles: DisplayRouteSummaries;
12864
13142
  countryCrossings: DisplayCountryCrossings;
13143
+ sectionFocus: RouteSections;
12865
13144
  carpoolSections: RouteSections | undefined;
12866
13145
  carTrainSections: RouteSections | undefined;
12867
13146
  importantRoadStretchSections: RouteSections | undefined;
@@ -13241,6 +13520,7 @@ export declare class TerrainModule extends AbstractStyleOwnedMapModule<TerrainSo
13241
13520
  get events(): ModuleEvents<TerrainModuleConfig>;
13242
13521
  private showHillshade;
13243
13522
  private showElevation;
13523
+ private setMapTerrain;
13244
13524
  private storeConfig;
13245
13525
  }
13246
13526
  //#endregion
@@ -14729,8 +15009,8 @@ export declare class TrafficAreaAnalyticsModule extends AbstractDataOwnedMapModu
14729
15009
  * the traffic flow vector tiles.
14730
15010
  *
14731
15011
  * @remarks
14732
- * `absoluteSpeed`, `partOfTwoWayRoad` and `openlr` stay `undefined`, because the standard styles
14733
- * do not request their tile tags.
15012
+ * The SDK requests every tile tag these properties come from, so `absoluteSpeed` and `openlr` are
15013
+ * on each section; `partOfTwoWayRoad` is there only when `true`.
14734
15014
  * No flow tile carries free-flow speed, travel time, delay or confidence. For historical speed and
14735
15015
  * congestion over an area, use the Traffic Area Analytics service.
14736
15016
  *
@@ -14939,8 +15219,8 @@ export declare class TrafficFlowModule extends AbstractStyleOwnedMapModule<Traff
14939
15219
  *
14940
15220
  * @remarks
14941
15221
  * This is the only way to read live flow values, because Orbis traffic flow is vector tiles, with
14942
- * no service for a road, a point or an area. Results cover the current viewport and zoom, and a segment crossing a
14943
- * tile boundary appears once per tile. See {@link TrafficFlowModuleFeature} for what each carries.
15222
+ * no service for a road, a point or an area. Results cover what is drawn in the current viewport and zoom, so a
15223
+ * hidden module returns none, and a segment crossing a tile boundary appears once per tile. See {@link TrafficFlowModuleFeature} for what each carries.
14944
15224
  *
14945
15225
  * @example
14946
15226
  * ```typescript
@@ -15567,4 +15847,4 @@ export declare const calculatePaddedCenter: (options: CalculateMapCenterOptions)
15567
15847
  */
15568
15848
  export declare const calculateFittingBBox: (options: CalculateFittingBBoxOptions) => BBox | null;
15569
15849
  //#endregion
15570
- export type { AreaAnalyticsBeforeLayerConfig, AreaAnalyticsColorStop, AreaAnalyticsColorStopsConfig, AreaAnalyticsDisplayMode, AreaAnalyticsHeightConfig, AreaAnalyticsMetricConfig, AreaAnalyticsMetricFilter, AreaAnalyticsPalette, AreaAnalyticsRegionFillConfig, AreaAnalyticsRegionLineConfig, AreaAnalyticsRegionPolygonConfig, AreaAnalyticsScaleMode, BaseMapColorName, BaseMapKnob, BaseMapKnobId, BaseMapKnobValueOf, BeforeLayerConfig, BespokeSectionType, ByIdOrIndex, CSSCursor, ClearEventStateOptions, ClearEventStatesOptions, ClickEventType, CountryCrossingAlignment, CountryCrossingConfig, CountryCrossingFeature, CountryCrossingLabelConfig, CustomGeoJSONKnob, CustomGeoJSONKnobId, CustomGeoJSONKnobValueOf, CustomImage, DefaultPlaceIconConfig, DisplayCountryCrossing, DisplayCountryCrossingProps, DisplayCountryCrossings, DisplayRouteProps, DisplayRouteRelatedProps, DisplayRouteSummaries, DisplayRouteSummary, DisplayRouteSummaryProps, DisplayWaypoint, DrawnSectionType, EventHandlerConfig, EventHandlerCursorConfig, EventHandlerHoverConfig, EventScope, EventState, EventStateIds, EventType, ExtraFeatureProp, FeatureLabelConfig, FeaturePropValue, FilterablePOICategory, GeneratedSectionType, GeoJSONSourceClusterOptions, GeoJSONSourcesWithLayers, GeometriesKnob, GeometriesKnobId, GeometriesKnobValueOf, HasAdditionalLayersConfig, HasBeforeID, HillshadeColors, HillshadeLightAlignment, HillshadeLightConfig, HillshadeMethod, HoverEventType, HslColor, IconMapping, IndexedFeature, LabelConfig, LayerQuery, LayerSpecFilter, LayerSpecTemplate, LayerSpecWithSource, LightDark, MapColorName, MapColors, MapEventsConfig, MapFont, MapLibreOptions, MapModuleCommonConfig, MapPreset, MapPresetId, MapPresetSettings, MapStyleLayerID, MapStylePOICategory, POIIconConfig, POILabelConfig, POIsKnob, POIsKnobId, POIsKnobValueOf, POIsModuleConfig, POIsModuleFeature, PartsBeforeLayerConfig, PinIconConfig, PlaceClusterBadgeConfig, PlaceConnectionDisplay, PlaceConnectionLabelConfig, PlaceConnectionLayerName, PlaceConnectionsConfig, PlaceConnectionsLayersConfig, PlaceEntryPointFeature, PlaceEntryPointProps, PlaceEntryPointsConfig, PlaceEntryPointsLayersConfig, PlaceEntryPointsShowFor, PlaceIconConfig, PlaceLabelConfig, PlaceLayerName, PlaceLayersConfig, PlacesBeforeLayerConfig, PlacesClusterConfig, PlacesClusterSourceConfig, PlacesKnob, PlacesKnobId, PlacesKnobValueOf, PlacesMarkerType, PlacesModuleConfig, PlacesModuleSerializableConfig, PlanningWaypoint, RGBAColor, ReachableRangesKnob, ReachableRangesKnobId, ReachableRangesKnobValueOf, RenderedRef, ResolvedEventScope, RouteHighlightConfig, RouteLayersConfig, RouteStateProps, RouteWaypointSize, RouteWidth, RoutingBeforeLayerConfig, RoutingKnob, RoutingKnobId, RoutingKnobValueOf, RoutingModuleConfig, RoutingModuleSerializableConfig, SVGIconStyleOptions, SectionDisplayConfig, SectionDrawStyle, SectionIconConfig, SectionIconPlacement, SectionKnobName, SectionKnobOf, SectionLineLayerName, SectionLinePattern, SectionSignConfig, SectionSignLayerName, SectionSignPlacement, SectionSignPriority, SectionSignUnit, SectionSourceKey, SectionSymbolLayerName, SectionTypeWithKnob, SectionsDisplayConfig, SerializableCustomImage, SerializableFeatureLabelConfig, SerializablePinIconConfig, SetEventStateOptions, ShowOptions, SourceWithLayerIDs, SourceWithLayers, SourcesWithLayers, StandardStyle, StandardStyleID, StyleColorKnobId, StyleInput, StyleKnobId, StyleKnobValueOf, StyleLayerGroupName, StyleModuleLayerGroupName, StylePart, StyleSourcesWithLayers, StylingFoundationsKnob, StylingFoundationsKnobAppliesTo, StylingFoundationsKnobId, StylingFoundationsKnobKind, StylingFoundationsKnobRange, StylingFoundationsKnobValue, StylingFoundationsKnobValueOf, StylingFoundationsModuleConfig, SupportsEvents, TerrainElevationConfig, TerrainHillshadeConfig, TerrainKnob, TerrainKnobId, TerrainKnobValueOf, TerrainModuleConfig, ToBeAddedLayerSpec, ToBeAddedLayerSpecTemplate, ToBeAddedLayerSpecWithoutSource, TomTomMapParams, TrafficAreaAnalyticsKnob, TrafficAreaAnalyticsKnobId, TrafficAreaAnalyticsKnobValueOf, TrafficAreaAnalyticsLayersConfig, TrafficAreaAnalyticsModuleConfig, TrafficFlowKnob, TrafficFlowKnobId, TrafficFlowKnobValueOf, TrafficIncidentDetailsKnob, TrafficIncidentDetailsKnobId, TrafficIncidentDetailsKnobValueOf, TrafficIncidentsKnob, TrafficIncidentsKnobId, TrafficIncidentsKnobValueOf, UserEventHandler, WaypointDisplayProps, WaypointHighlightConfig, WaypointIconConfig, WaypointIndexType, WaypointLabelConfig, WaypointStopNumbering, WaypointsConfig };
15850
+ export type { AreaAnalyticsBeforeLayerConfig, AreaAnalyticsColorStop, AreaAnalyticsColorStopsConfig, AreaAnalyticsDisplayMode, AreaAnalyticsHeightConfig, AreaAnalyticsMetricConfig, AreaAnalyticsMetricFilter, AreaAnalyticsPalette, AreaAnalyticsRegionFillConfig, AreaAnalyticsRegionLineConfig, AreaAnalyticsRegionPolygonConfig, AreaAnalyticsScaleMode, BaseMapColorName, BaseMapKnob, BaseMapKnobId, BaseMapKnobValueOf, BeforeLayerConfig, BespokeSectionType, ByIdOrIndex, CSSCursor, ClearEventStateOptions, ClearEventStatesOptions, ClickEventType, CountryCrossingAlignment, CountryCrossingConfig, CountryCrossingFeature, CountryCrossingLabelConfig, CustomGeoJSONKnob, CustomGeoJSONKnobId, CustomGeoJSONKnobValueOf, CustomImage, CustomTypeface, CustomTypefaceFile, DefaultPlaceIconConfig, DisplayCountryCrossing, DisplayCountryCrossingProps, DisplayCountryCrossings, DisplayRouteProps, DisplayRouteRelatedProps, DisplayRouteSummaries, DisplayRouteSummary, DisplayRouteSummaryProps, DisplayWaypoint, DrawnSectionType, EventHandlerConfig, EventHandlerCursorConfig, EventHandlerHoverConfig, EventScope, EventState, EventStateIds, EventType, ExtraFeatureProp, FeatureLabelConfig, FeaturePropValue, FilterablePOICategory, GeneratedSectionType, GeoJSONSourceClusterOptions, GeoJSONSourcesWithLayers, GeometriesKnob, GeometriesKnobId, GeometriesKnobValueOf, HasAdditionalLayersConfig, HasBeforeID, HillshadeColors, HillshadeLightAlignment, HillshadeLightConfig, HillshadeMethod, HoverEventType, HslColor, IconMapping, IndexedFeature, LabelConfig, LayerQuery, LayerSpecFilter, LayerSpecTemplate, LayerSpecWithSource, LightDark, MapColorName, MapColors, MapEventsConfig, MapFont, MapLibreOptions, MapModuleCommonConfig, MapPreset, MapPresetId, MapPresetSettings, MapStyleLayerID, MapStylePOICategory, MapTypeface, POIIconConfig, POILabelConfig, POIsKnob, POIsKnobId, POIsKnobValueOf, POIsModuleConfig, POIsModuleFeature, PartsBeforeLayerConfig, PinIconConfig, PlaceClusterBadgeConfig, PlaceConnectionDisplay, PlaceConnectionLabelConfig, PlaceConnectionLayerName, PlaceConnectionsConfig, PlaceConnectionsLayersConfig, PlaceEntryPointFeature, PlaceEntryPointProps, PlaceEntryPointsConfig, PlaceEntryPointsLayersConfig, PlaceEntryPointsShowFor, PlaceIconConfig, PlaceLabelConfig, PlaceLayerName, PlaceLayersConfig, PlacesBeforeLayerConfig, PlacesClusterConfig, PlacesClusterSourceConfig, PlacesKnob, PlacesKnobId, PlacesKnobValueOf, PlacesMarkerType, PlacesModuleConfig, PlacesModuleSerializableConfig, PlanningWaypoint, RGBAColor, ReachableRangesKnob, ReachableRangesKnobId, ReachableRangesKnobValueOf, RenderedRef, ResolvedEventScope, RouteHighlightConfig, RouteLayersConfig, RouteStateProps, RouteWaypointSize, RouteWidth, RoutingBeforeLayerConfig, RoutingKnob, RoutingKnobId, RoutingKnobValueOf, RoutingModuleConfig, RoutingModuleSerializableConfig, SVGIconStyleOptions, SectionDisplayConfig, SectionDrawStyle, SectionIconConfig, SectionIconPlacement, SectionKnobName, SectionKnobOf, SectionLineLayerName, SectionLinePattern, SectionSignConfig, SectionSignLayerName, SectionSignPlacement, SectionSignPriority, SectionSignUnit, SectionSourceKey, SectionSymbolLayerName, SectionTypeWithKnob, SectionsDisplayConfig, SerializableCustomImage, SerializableFeatureLabelConfig, SerializablePinIconConfig, SetEventStateOptions, ShowOptions, SourceWithLayerIDs, SourceWithLayers, SourcesWithLayers, StandardStyle, StandardStyleID, StyleColorKnobId, StyleInput, StyleKnobId, StyleKnobValueOf, StyleLayerGroupName, StyleModuleLayerGroupName, StylePart, StyleSourcesWithLayers, StylingFoundationsKnob, StylingFoundationsKnobAppliesTo, StylingFoundationsKnobId, StylingFoundationsKnobKind, StylingFoundationsKnobRange, StylingFoundationsKnobValue, StylingFoundationsKnobValueOf, StylingFoundationsModuleConfig, SupportsEvents, TerrainElevationConfig, TerrainHillshadeConfig, TerrainKnob, TerrainKnobId, TerrainKnobValueOf, TerrainModuleConfig, ToBeAddedLayerSpec, ToBeAddedLayerSpecTemplate, ToBeAddedLayerSpecWithoutSource, TomTomMapParams, TrafficAreaAnalyticsKnob, TrafficAreaAnalyticsKnobId, TrafficAreaAnalyticsKnobValueOf, TrafficAreaAnalyticsLayersConfig, TrafficAreaAnalyticsModuleConfig, TrafficFlowKnob, TrafficFlowKnobId, TrafficFlowKnobValueOf, TrafficIncidentDetailsKnob, TrafficIncidentDetailsKnobId, TrafficIncidentDetailsKnobValueOf, TrafficIncidentsKnob, TrafficIncidentsKnobId, TrafficIncidentsKnobValueOf, UserEventHandler, WaypointDisplayProps, WaypointHighlightConfig, WaypointIconConfig, WaypointIndexType, WaypointLabelConfig, WaypointStopNumbering, WaypointsConfig };