@tomtom-org/maps-sdk 0.55.1 → 0.57.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, 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, 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.
@@ -311,7 +311,7 @@ export type StandardStyle = {
311
311
  * Available modules:
312
312
  * - `trafficIncidents`: Real-time traffic incidents (accidents, closures)
313
313
  * - `trafficFlow`: Real-time traffic flow visualization
314
- * - `hillshade`: Terrain elevation shading
314
+ * - `hillshade`: Terrain elevation data, for hillshade shading and 3D terrain
315
315
  *
316
316
  * @example
317
317
  * ```typescript
@@ -342,9 +342,35 @@ export type StandardStyle = {
342
342
  version?: string;
343
343
  };
344
344
  /**
345
- * Configuration for a custom map style.
345
+ * Where a custom style comes from: a URL to fetch it from, or the specification itself. Exactly one.
346
+ *
347
+ * @example
348
+ * ```typescript
349
+ * const fromUrl: CustomStyleSource = { url: 'https://example.com/my-custom-style.json' };
346
350
  *
347
- * Allows using your own map style either via URL or direct JSON specification.
351
+ * const fromJson: CustomStyleSource = {
352
+ * json: { version: 8, sources: { ... }, layers: [ ... ] },
353
+ * };
354
+ * ```
355
+ *
356
+ * @group Map Style
357
+ */
358
+ export type CustomStyleSource = {
359
+ /**
360
+ * URL to a MapLibre/Mapbox style JSON, without an API key — the SDK adds the configured one.
361
+ */
362
+ url: string;
363
+ json?: never;
364
+ } | {
365
+ /**
366
+ * The complete style, as a
367
+ * [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/) object.
368
+ */
369
+ json: StyleSpecification;
370
+ url?: never;
371
+ };
372
+ /**
373
+ * Configuration for a custom map style.
348
374
  *
349
375
  * @remarks
350
376
  * Use custom styles for:
@@ -371,41 +397,7 @@ export type StandardStyle = {
371
397
  *
372
398
  * @group Map Style
373
399
  */
374
- export type CustomStyle = {
375
- /**
376
- * URL to a MapLibre/Mapbox style JSON.
377
- *
378
- * The URL should not include the API key - it will be automatically added.
379
- * Mutually exclusive with the `json` property.
380
- *
381
- * @example
382
- * ```typescript
383
- * url: 'https://api.tomtom.com/style/1/style/my-custom-style'
384
- * ```
385
- */
386
- url?: string;
387
- /**
388
- * Direct style specification as JSON.
389
- *
390
- * Provide the complete MapLibre Style Specification object.
391
- * Mutually exclusive with the `url` property.
392
- *
393
- * @see [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/)
394
- *
395
- * @example
396
- * ```typescript
397
- * json: {
398
- * version: 8,
399
- * sources: {
400
- * 'my-source': { type: 'vector', url: '...' }
401
- * },
402
- * layers: [
403
- * { id: 'background', type: 'background', paint: { 'background-color': '#f0f0f0' } }
404
- * ]
405
- * }
406
- * ```
407
- */
408
- json?: StyleSpecification;
400
+ export type CustomStyle = CustomStyleSource & {
409
401
  /**
410
402
  * Whether the style draws a light or a dark map.
411
403
  *
@@ -440,7 +432,7 @@ export declare const styleModules: readonly ["trafficIncidents", "trafficFlow",
440
432
  * @remarks
441
433
  * - `trafficIncidents`: Shows real-time traffic incidents on the map
442
434
  * - `trafficFlow`: Shows real-time traffic flow with color-coded speeds
443
- * - `hillshade`: Adds terrain elevation shading for topographic context
435
+ * - `hillshade`: Adds terrain elevation data, drawn by {@link TerrainModule} as hillshade shading and 3D terrain
444
436
  *
445
437
  * @group Map Style
446
438
  */
@@ -585,7 +577,6 @@ export type TomTomMapParams = Partial<GlobalConfig> & {
585
577
  * zoom: 12,
586
578
  * pitch: 45,
587
579
  * bearing: -17.6,
588
- * antialias: true,
589
580
  * maxZoom: 18,
590
581
  * minZoom: 8
591
582
  * }
@@ -952,7 +943,6 @@ export declare class TomTomMap {
952
943
  * zoom: 13,
953
944
  * pitch: 45,
954
945
  * bearing: -17.6,
955
- * antialias: true,
956
946
  * maxZoom: 18,
957
947
  * minZoom: 8
958
948
  * }
@@ -3852,8 +3842,7 @@ export declare abstract class AbstractMapModule<SOURCES_WITH_LAYERS extends Sour
3852
3842
  * module behavior even when the map's base style is modified.
3853
3843
  *
3854
3844
  * Unless a module documents otherwise, the given configuration **replaces** the current one
3855
- * rather than being merged into it. To change one part of it, spread the current
3856
- * configuration into the new one: `myModule.applyConfig({ ...myModule.getConfig(), theme })`.
3845
+ * rather than being merged into it. To change one part of it, use {@link updateConfig}.
3857
3846
  *
3858
3847
  * @example
3859
3848
  * ```typescript
@@ -3868,6 +3857,25 @@ export declare abstract class AbstractMapModule<SOURCES_WITH_LAYERS extends Sour
3868
3857
  * @see {@link getConfig} to retrieve the current configuration
3869
3858
  */
3870
3859
  applyConfig(config: CFG | undefined): void;
3860
+ /**
3861
+ * Changes part of the configuration and keeps the rest.
3862
+ *
3863
+ * The given properties are laid over the current configuration — one level deep, so a nested
3864
+ * object you pass replaces the nested object that was there — and the result is applied with
3865
+ * {@link applyConfig}. This is the same on every module, whatever its `applyConfig` does with a
3866
+ * whole configuration.
3867
+ *
3868
+ * @param partial - The properties to change.
3869
+ *
3870
+ * @example
3871
+ * ```typescript
3872
+ * routing.applyConfig({ displayUnits: 'imperial', theme: { mainColor: '#0a3653' } });
3873
+ * routing.updateConfig({ theme: { mainColor: '#c2185b' } }); // displayUnits stays imperial
3874
+ * ```
3875
+ *
3876
+ * @see {@link applyConfig} to apply a whole configuration
3877
+ */
3878
+ updateConfig(partial: Partial<NonNullable<CFG>>): void;
3871
3879
  /**
3872
3880
  * Emits a `config-change` event to all registered handlers.
3873
3881
  * Skipped during module initialisation to avoid spurious events.
@@ -4011,6 +4019,12 @@ export declare abstract class AbstractMapModule<SOURCES_WITH_LAYERS extends Sour
4011
4019
  * @ignore
4012
4020
  */
4013
4021
  protected userEvents<T = MapGeoJSONFeature, WHERE_SCOPE = never>(sourceNames: (keyof SOURCES_WITH_LAYERS)[], options?: EventScopeOptions<T, WHERE_SCOPE>): UserEvents<T, WHERE_SCOPE>;
4022
+ /**
4023
+ * `config-change` alone: the event surface of a module with no `show` and nothing on the map a
4024
+ * user can interact with, and the lifecycle half of {@link moduleEvents}.
4025
+ * @ignore
4026
+ */
4027
+ protected lifecycleEvents(): ModuleEvents<CFG, never>;
4014
4028
  /**
4015
4029
  * The event surface of a module with no `show`: user events over the named sources, plus
4016
4030
  * `config-change`. `shown-features` is not subscribable here — `TShown` is `never`, which
@@ -4073,10 +4087,10 @@ export declare abstract class AbstractDataOwnedMapModule<SOURCES_WITH_LAYERS ext
4073
4087
  //#region src/shared/AbstractStyleOwnedMapModule.d.ts
4074
4088
  /**
4075
4089
  * Base class for the map modules that control sources and layers the loaded map style already
4076
- * provides, under fixed global IDs: the base map, POIs, the traffic tiles and hillshade.
4090
+ * provides, under fixed global IDs: the base map, POIs, the traffic tiles and the terrain.
4077
4091
  *
4078
4092
  * @remarks
4079
- * The style owns the data, so such a module adds no sources of its own and shows nothing by
4093
+ * The style owns the data, so such a module brings no data of its own and shows nothing by
4080
4094
  * itself. It changes how the parts the style provides are drawn, filtered and made visible.
4081
4095
  * The SDK memoizes one instance per map, obtained with `get(map, config?)`, so every handle on it
4082
4096
  * sees the same state.
@@ -4107,9 +4121,11 @@ export declare abstract class AbstractStyleOwnedMapModule<SOURCES_WITH_LAYERS ex
4107
4121
  * - `number`: an absolute number with a range.
4108
4122
  * - `color`: a CSS colour string.
4109
4123
  * - `enum`: one of the knob's `options`.
4124
+ * - `colors`: a list of colours, each a CSS colour string or one of the knob's `options` — names
4125
+ * the module resolves to colours, such as styling knob ids. An empty list is the knob's default.
4110
4126
  * @group Shared
4111
4127
  */
4112
- export type KnobKind = 'toggle' | 'factor' | 'number' | 'color' | 'enum';
4128
+ export type KnobKind = 'toggle' | 'factor' | 'number' | 'color' | 'enum' | 'colors';
4113
4129
  /**
4114
4130
  * Inclusive bounds for a `factor` or `number` knob. `step` is what a slider would use; some ranges
4115
4131
  * (e.g. opacity 0–1) have no natural step and omit it.
@@ -4160,7 +4176,7 @@ export type KnobDescriptor<T = unknown> = {
4160
4176
  overridden: boolean;
4161
4177
  /** Inclusive bounds, for `factor` and `number` knobs. */
4162
4178
  range?: KnobRange;
4163
- /** The allowed values, for `enum` knobs. */
4179
+ /** The allowed values, for `enum` knobs; the names accepted besides CSS colours, for `colors` knobs. */
4164
4180
  options?: readonly string[];
4165
4181
  /**
4166
4182
  * Whether the knob has anything to work on in the loaded style. Omitted by modules whose knobs
@@ -4378,15 +4394,25 @@ type MapFont = (typeof mapFonts)[number];
4378
4394
  */
4379
4395
  export declare const POI_SOURCE_ID = "vectorTiles";
4380
4396
  /**
4381
- * Source identifier for hillshade terrain visualization.
4397
+ * Source identifier of the style's elevation data, added by the `hillshade` style part.
4382
4398
  *
4383
4399
  * @remarks
4384
- * References the raster source that provides terrain shading to visualize
4385
- * elevation and topography on the map.
4400
+ * A raster-dem source, drawn as the hillshade layer. {@link TerrainModule} raises the 3D surface
4401
+ * from a copy of it, {@link TERRAIN_SOURCE_ID}.
4386
4402
  *
4387
- * @group Hillshade
4403
+ * @group Terrain
4388
4404
  */
4389
4405
  export declare const HILLSHADE_SOURCE_ID = "hillshade";
4406
+ /**
4407
+ * Source identifier of the 3D terrain surface: a copy of {@link HILLSHADE_SOURCE_ID} that
4408
+ * {@link TerrainModule} adds when elevation is first enabled.
4409
+ *
4410
+ * @remarks
4411
+ * MapLibre renders hillshade and 3D terrain at a lower quality when both share one source.
4412
+ *
4413
+ * @group Terrain
4414
+ */
4415
+ export declare const TERRAIN_SOURCE_ID = "hillshade-terrain";
4390
4416
  /**
4391
4417
  * Source identifier for base map vector tiles.
4392
4418
  *
@@ -4424,7 +4450,7 @@ export declare const TRAFFIC_FLOW_SOURCE_ID = "vectorTilesFlow";
4424
4450
  *
4425
4451
  * Style-owned modules control sources and layers the map style already provides, under fixed
4426
4452
  * global IDs, so a second instance would be a second controller over one piece of shared state.
4427
- * Callers get the same instance instead — two components each asking for hillshade is reasonable
4453
+ * Callers get the same instance instead — two components each asking for the terrain is reasonable
4428
4454
  * code, and making them hoist a shared reference would be work pushed onto them for no benefit.
4429
4455
  *
4430
4456
  * @param map The map the module belongs to.
@@ -4717,7 +4743,7 @@ export type BaseMapEvents = CombinedEvents<MapGeoJSONFeature, BaseMapModuleConfi
4717
4743
  *
4718
4744
  * @remarks
4719
4745
  * **Managed Layers:**
4720
- * - Background and terrain
4746
+ * - Background and land cover
4721
4747
  * - Water bodies and coastlines
4722
4748
  * - Country and administrative borders
4723
4749
  * - Buildings (2D and 3D)
@@ -4728,7 +4754,7 @@ export type BaseMapEvents = CombinedEvents<MapGeoJSONFeature, BaseMapModuleConfi
4728
4754
  * **Does NOT Include:**
4729
4755
  * - Traffic flow/incidents (use {@link TrafficFlowModule} or {@link TrafficIncidentsModule})
4730
4756
  * - Points of Interest/POIs (use {@link POIsModule})
4731
- * - Hillshade/terrain shading (use {@link HillshadeModule})
4757
+ * - Hillshade and 3D terrain (use {@link TerrainModule})
4732
4758
  *
4733
4759
  * **Use Cases:**
4734
4760
  * - Toggle base map visibility on/off
@@ -6500,207 +6526,6 @@ export type ExtraGeometryDisplayProps = {
6500
6526
  */
6501
6527
  export type DisplayGeometryProps = CommonPlaceProps & ExtraGeometryDisplayProps;
6502
6528
  //#endregion
6503
- //#region src/hillshade/HillshadeModule.d.ts
6504
- /**
6505
- * IDs of sources and layers for hillshade module.
6506
- */
6507
- type HillshadeSourcesWithLayers = {
6508
- hillshade: StyleSourceWithLayers;
6509
- };
6510
- /**
6511
- * Map module for displaying terrain shading (hillshade).
6512
- *
6513
- * The HillshadeModule adds realistic terrain depth perception to the map by rendering
6514
- * shadow and highlight effects based on elevation data. This enhances the 3D appearance
6515
- * of mountainous and hilly terrain.
6516
- *
6517
- * @remarks
6518
- * **Features:**
6519
- * - Realistic terrain shading
6520
- * - Uses vector tile elevation data
6521
- * - Lightweight performance impact
6522
- * - Seamlessly integrates with other map layers
6523
- * - Toggle visibility on/off
6524
- *
6525
- * **Common Use Cases:**
6526
- * - Outdoor recreation maps (hiking, skiing)
6527
- * - Geographic/topographic applications
6528
- * - Environmental visualization
6529
- * - Landscape planning tools
6530
- *
6531
- * @example
6532
- * ```typescript
6533
- * // Create the module with hillshade visible
6534
- * const hillshade = await HillshadeModule.getInstance(map, {
6535
- * visible: true
6536
- * });
6537
- *
6538
- * // Toggle visibility
6539
- * hillshade.setVisible(false);
6540
- *
6541
- * // Listen to events
6542
- * hillshade.events.on('click', (feature, lngLat) => {
6543
- * console.log('Clicked hillshade at:', lngLat);
6544
- * });
6545
- * ```
6546
- *
6547
- * @see [Hillshade Guide](https://docs.tomtom.com/maps-sdk-js/guides/map/hillshade)
6548
- *
6549
- * @group Hillshade
6550
- */
6551
- export declare class HillshadeModule extends AbstractStyleOwnedMapModule<HillshadeSourcesWithLayers, HillshadeModuleConfig> {
6552
- /**
6553
- * Retrieves a HillshadeModule instance for the given map.
6554
- *
6555
- * @param map - The TomTomMap instance to attach this module to.
6556
- * @param config - Optional configuration for initialization and visibility.
6557
- *
6558
- * @returns A promise that resolves to the initialized HillshadeModule.
6559
- *
6560
- * @remarks
6561
- * **Configuration:**
6562
- * - `visible`: Initial visibility state
6563
- * - `ensureAddedToStyle`: Auto-add hillshade to style if missing
6564
- *
6565
- * **Style Requirement:**
6566
- * - Hillshade must be included in the map style or added via `ensureAddedToStyle`
6567
- * - Some styles may not support hillshade (e.g., satellite)
6568
- *
6569
- * @throws Error if hillshade source is not in style and `ensureAddedToStyle` is false
6570
- *
6571
- * @example
6572
- * Default initialization:
6573
- * ```typescript
6574
- * const hillshadeModule = await HillshadeModule.get(map);
6575
- * ```
6576
- *
6577
- * @example
6578
- * Auto-add to style if missing:
6579
- * ```typescript
6580
- * const hillshadeModule = await HillshadeModule.get(map, {
6581
- * visible: true
6582
- * });
6583
- * ```
6584
- *
6585
- * @example
6586
- * Start hidden:
6587
- * ```typescript
6588
- * const hillshadeModule = await HillshadeModule.get(map, {
6589
- * visible: false
6590
- * });
6591
- * ```
6592
- *
6593
- * @remarks
6594
- * **Instances:**
6595
- * `HillshadeModule` controls the hillshade source and layers the map style already provides,
6596
- * under fixed global IDs. Every instance is another handle on that same shared state, so
6597
- * visibility applied through one is visible through all of them.
6598
- */
6599
- static get(map: TomTomMap, config?: HillshadeModuleConfig): Promise<HillshadeModule>;
6600
- private constructor();
6601
- /**
6602
- * @ignore
6603
- */
6604
- protected _initSourcesWithLayers(): {
6605
- hillshade: StyleSourceWithLayers<import("maplibre-gl").SourceSpecification, import("maplibre-gl").Source>;
6606
- };
6607
- /**
6608
- * @ignore
6609
- */
6610
- protected _applyConfig(config: HillshadeModuleConfig | undefined): HillshadeModuleConfig | undefined;
6611
- /**
6612
- * Sets the visibility of the hillshade layer.
6613
- *
6614
- * @param visible - `true` to show hillshade, `false` to hide it.
6615
- *
6616
- * @remarks
6617
- * Changes are applied immediately if the map is ready.
6618
- *
6619
- * @example
6620
- * ```typescript
6621
- * hillshade.setVisible(true); // Show terrain shading
6622
- * hillshade.setVisible(false); // Hide terrain shading
6623
- * ```
6624
- */
6625
- setVisible(visible: boolean): void;
6626
- private _setVisible;
6627
- /**
6628
- * Checks if the hillshade layer is currently visible.
6629
- *
6630
- * @returns `true` if visible, `false` if hidden.
6631
- *
6632
- * @example
6633
- * ```typescript
6634
- * if (hillshade.isVisible()) {
6635
- * console.log('Terrain shading is active');
6636
- * }
6637
- * ```
6638
- */
6639
- isVisible(): boolean;
6640
- /**
6641
- * Gets the unified events interface for this module, covering both user interactions
6642
- * and module lifecycle events.
6643
- *
6644
- * **User interaction events** (`click`, `contextmenu`, `hover`, `long-hover`):
6645
- * ```typescript
6646
- * hillshade.events.on('click', (feature, lngLat) => {
6647
- * console.log('Clicked terrain at:', lngLat);
6648
- * });
6649
- * ```
6650
- *
6651
- * **Module lifecycle events** (`config-change`):
6652
- * ```typescript
6653
- * const unsub = hillshade.events.on('config-change', (config) => {
6654
- * console.log('Hillshade config changed:', config);
6655
- * });
6656
- * unsub();
6657
- * ```
6658
- */
6659
- get events(): CombinedEvents<import('maplibre-gl').MapGeoJSONFeature, HillshadeModuleConfig, never>;
6660
- }
6661
- //#endregion
6662
- //#region src/hillshade/types/hillshadeModuleConfig.d.ts
6663
- /**
6664
- * Configuration options for the HillshadeModule.
6665
- *
6666
- * Controls the appearance and visibility of terrain shading on the map.
6667
- *
6668
- * @remarks
6669
- * The HillshadeModule uses vector tile elevation data to create shadow/highlight
6670
- * effects that enhance the 3D perception of terrain features like mountains and valleys.
6671
- *
6672
- * **Configuration Options:**
6673
- * - `visible`: Whether the hillshade layer is shown or hidden
6674
- *
6675
- * **Visual Effect:**
6676
- * - Creates realistic terrain depth perception
6677
- * - Lightweight performance impact
6678
- * - Works alongside other map layers
6679
- *
6680
- * @example
6681
- * ```typescript
6682
- * // Show hillshade
6683
- * const config: HillshadeModuleConfig = {
6684
- * visible: true
6685
- * };
6686
- *
6687
- * // Hide hillshade initially
6688
- * const hiddenConfig: HillshadeModuleConfig = {
6689
- * visible: false
6690
- * };
6691
- * ```
6692
- *
6693
- * @group Hillshade
6694
- */
6695
- type HillshadeModuleConfig = MapModuleCommonConfig & {
6696
- /**
6697
- * Controls the visibility of the hillshade layers.
6698
- *
6699
- * @default false
6700
- */
6701
- visible?: boolean;
6702
- };
6703
- //#endregion
6704
6529
  //#region src/pois/util/poiCategoryMapping.d.ts
6705
6530
  /**
6706
6531
  * POI category mappings that have a direct equivalent in Map Display POI categories.
@@ -7497,7 +7322,7 @@ type PlaceConnectionsConfig = {
7497
7322
  *
7498
7323
  * @group Places
7499
7324
  */
7500
- type PlacesModuleConfig = MapModuleCommonConfig & {
7325
+ type PlacesModuleConfig<P extends CommonPlaceProps = CommonPlaceProps> = MapModuleCommonConfig & {
7501
7326
  /**
7502
7327
  * Base style for all places.
7503
7328
  *
@@ -7580,10 +7405,26 @@ type PlacesModuleConfig = MapModuleCommonConfig & {
7580
7405
  * }
7581
7406
  * ```
7582
7407
  */
7583
- extraFeatureProps?: {
7584
- [key: string]: ((place: Place) => any) | any;
7585
- };
7408
+ extraFeatureProps?: Record<string, ExtraFeatureProp<P>>;
7409
+ };
7410
+ /**
7411
+ * A value a GeoJSON feature property can hold.
7412
+ *
7413
+ * @group Places
7414
+ */
7415
+ type FeaturePropValue = string | number | boolean | null | undefined | FeaturePropValue[] | {
7416
+ [key: string]: FeaturePropValue;
7586
7417
  };
7418
+ /**
7419
+ * An entry of {@link PlacesModuleConfig.extraFeatureProps}: a fixed value written onto every place
7420
+ * feature, or a function computing one per place.
7421
+ *
7422
+ * @typeParam P - The place properties the callbacks receive. Name it on the config
7423
+ * (`PlacesModuleConfig<MyPlaceProps>`) to have callbacks typed for the places you show.
7424
+ *
7425
+ * @group Places
7426
+ */
7427
+ type ExtraFeatureProp<P extends CommonPlaceProps = CommonPlaceProps> = FeaturePropValue | ((place: Place<P>) => FeaturePropValue);
7587
7428
  //#endregion
7588
7429
  //#region src/places/utils/prepareConnectionsForDisplay.d.ts
7589
7430
  /**
@@ -7652,89 +7493,6 @@ export type PlacesEvents = CombinedEvents<MapGeoJSONFeature, PlacesModuleConfig,
7652
7493
  /** The lines and labels connecting places to their parent, when connections are shown. */
7653
7494
  connections: UserEvents<MapGeoJSONFeature>;
7654
7495
  };
7655
- /**
7656
- * Map module for displaying and managing place markers.
7657
- *
7658
- * The PlacesModule provides functionality to display location markers (pins) on the map
7659
- * for points of interest, search results, or custom locations. It supports various marker
7660
- * styles, custom icons, text labels, and interactive events.
7661
- *
7662
- * @remarks
7663
- * **Features:**
7664
- * - Multiple marker styles (pin, circle-icon, base-map POI-like)
7665
- * - Custom icons per POI category
7666
- * - Text labels with styling options
7667
- * - Data-driven styling via MapLibre expressions
7668
- * - Interactive events (click, hover, etc.)
7669
- * - Support for custom feature properties
7670
- * - EV charging station availability display (opt-in)
7671
- *
7672
- * **Marker Styles:**
7673
- * - `pin`: Traditional teardrop-shaped map pins
7674
- * - `circle-icon`: Simple circular markers (previously named `circle`)
7675
- * - `base-map`: Mimics the map's built-in POI layer styling (combines `main`, `selected`, and `micro` layers). For micro-only rendering, hide the `main` layer via `layers.main.layout.visibility = 'none'`.
7676
- *
7677
- * **EV Charging Station Availability:**
7678
- * When displaying EV charging stations with availability data from
7679
- * {@link getPlacesWithEVAvailability}, the module can:
7680
- * - Show available/total charging points (e.g., "3/10")
7681
- * - Color-code availability (green = good, orange = limited, red = none/low)
7682
- * - Display as formatted text within the station's label
7683
- *
7684
- * This feature is disabled by default. To enable it, set `evAvailability.enabled` to `true`
7685
- * in the configuration.
7686
- *
7687
- * **Common Use Cases:**
7688
- * - Search result visualization
7689
- * - Custom location markers
7690
- * - Store locators
7691
- * - EV charging station maps with real-time availability
7692
- * - Delivery/pickup points
7693
- * - Saved locations display
7694
- *
7695
- * @example
7696
- * ```typescript
7697
- * // Create places module with pin markers
7698
- * const placesModule = await PlacesModule.create(map, {
7699
- * icon: {
7700
- * categoryIcons: []
7701
- * },
7702
- * text: {
7703
- * field: (place) => place.properties.poi?.name || 'Unknown'
7704
- * },
7705
- * theme: 'pin'
7706
- * });
7707
- *
7708
- * // Display places from search
7709
- * await placesModule.show(searchResults);
7710
- *
7711
- * // EV Charging Stations - Opt-in to availability display
7712
- * const evStations = await PlacesModule.create(map, {
7713
- * evAvailability: { enabled: true }
7714
- * });
7715
- * const results = await search({ poiCategories: ['ELECTRIC_VEHICLE_STATION'] });
7716
- * evStations.show(await getPlacesWithEVAvailability(results)); // Shows availability
7717
- *
7718
- * // Granular control: Enable for searched stations only, background stations without
7719
- * const bgStations = await PlacesModule.create(map); // EV availability disabled
7720
- * const searched = await PlacesModule.create(map, {
7721
- * evAvailability: { enabled: true }
7722
- * });
7723
- *
7724
- * // Handle clicks
7725
- * placesModule.events.on('click', (feature) => {
7726
- * console.log('Clicked:', feature.properties);
7727
- * });
7728
- *
7729
- * placesModule.events.on('hover', (feature) => {
7730
- * showTooltip(feature.properties.poi?.name);
7731
- * });
7732
- * ```
7733
- *
7734
- * @see [Places Guide](https://docs.tomtom.com/maps-sdk-js/guides/map/places)
7735
- *
7736
- * @group Places
7737
- */
7738
7496
  export declare class PlacesModule extends AbstractDataOwnedMapModule<PlacesSourcesAndLayers, PlacesModuleConfig> {
7739
7497
  private layerSpecs;
7740
7498
  private connectionLayerSpecs;
@@ -7757,7 +7515,7 @@ export declare class PlacesModule extends AbstractDataOwnedMapModule<PlacesSourc
7757
7515
  * @param config The module optional configuration
7758
7516
  * @returns {Promise} Returns a promise with a new instance of this module
7759
7517
  */
7760
- static create(tomtomMap: TomTomMap, config?: PlacesModuleConfig): Promise<PlacesModule>;
7518
+ static create<P extends CommonPlaceProps = CommonPlaceProps>(tomtomMap: TomTomMap, config?: PlacesModuleConfig<P>): Promise<PlacesModule>;
7761
7519
  private constructor();
7762
7520
  /**
7763
7521
  * @ignore
@@ -7868,9 +7626,7 @@ export declare class PlacesModule extends AbstractDataOwnedMapModule<PlacesSourc
7868
7626
  * });
7869
7627
  * ```
7870
7628
  */
7871
- applyExtraFeatureProps(extraFeatureProps: {
7872
- [key: string]: any;
7873
- }): void;
7629
+ applyExtraFeatureProps<P extends CommonPlaceProps = CommonPlaceProps>(extraFeatureProps: NonNullable<PlacesModuleConfig<P>['extraFeatureProps']>): void;
7874
7630
  private updateLayersAndData;
7875
7631
  private rebuildSourcesAndLayers;
7876
7632
  private updateConnectionLayersAndData;
@@ -9258,6 +9014,18 @@ type RouteLayersConfig = {
9258
9014
  */
9259
9015
  routeSummaryBubbleSymbol?: Partial<ToBeAddedLayerSpecTemplate<SymbolLayerSpecification>>;
9260
9016
  } & HasAdditionalLayersConfig;
9017
+ /**
9018
+ * Border crossing layers.
9019
+ *
9020
+ * @remarks
9021
+ * Anything {@link CountryCrossingConfig} cannot express about the plaque or its label.
9022
+ */
9023
+ countryCrossings?: {
9024
+ /**
9025
+ * Symbol layer writing each crossing's label on its plaque.
9026
+ */
9027
+ routeCountryCrossing?: Partial<ToBeAddedLayerSpecTemplate<SymbolLayerSpecification>>;
9028
+ } & HasAdditionalLayersConfig;
9261
9029
  };
9262
9030
  /**
9263
9031
  * Mapping of charging stop speeds to sprite image IDs.
@@ -9512,9 +9280,6 @@ type SectionIconConfig = {
9512
9280
  * - `center`: one icon at the middle of each section.
9513
9281
  * - `along`: icons repeated along the section.
9514
9282
  *
9515
- * A section is a stretch of line, so there is no placement at its start: MapLibre places
9516
- * symbols on a line either once at its centre or repeatedly along it.
9517
- *
9518
9283
  * @defaultValue `"center"`
9519
9284
  */
9520
9285
  placement?: 'center' | 'along';
@@ -9579,6 +9344,23 @@ type SectionKnobs = {
9579
9344
  * @group Routing
9580
9345
  */
9581
9346
  type SectionSignUnit = 'km/h' | 'mph';
9347
+ /**
9348
+ * Where a section's signs are posted along the stretch they belong to.
9349
+ *
9350
+ * @remarks
9351
+ * - `atChange`, the default — one sign where the value changes, and none after it, which is where
9352
+ * the road posts its own. Sections of a sign-posting type tile the route end to end and no two
9353
+ * consecutive ones carry the same value, so every section boundary is a change.
9354
+ * - `along` — the sign repeated down the stretch at a fixed screen spacing, so a reader zoomed into
9355
+ * the middle of a long one still sees the value in force. A stretch too short on screen to fit a
9356
+ * sign draws none.
9357
+ *
9358
+ * A stretch can run 50 km, so under `atChange` a reader zoomed in past its start sees no sign until
9359
+ * the next change — as on the road itself.
9360
+ *
9361
+ * @group Routing
9362
+ */
9363
+ type SectionSignPlacement = 'atChange' | 'along';
9582
9364
  /**
9583
9365
  * What a section's signs give way to when two symbols want the same spot.
9584
9366
  *
@@ -9587,9 +9369,8 @@ type SectionSignUnit = 'km/h' | 'mph';
9587
9369
  * one that gives way.
9588
9370
  *
9589
9371
  * - `belowMapLabels` — the signs give way to everything, the base map's own labels included, so a
9590
- * sign never lands on a street or place name. Sparse maps, and the price of a tidy one: in a city
9591
- * the labels take most of the room. Affordable because a sign repeats along its stretch, so one
9592
- * dropped where a label sits reappears further along.
9372
+ * sign never lands on a street or place name, at the cost of showing fewer in a city. Cheap under
9373
+ * `along` placement, where the dropped sign is posted again further down the stretch.
9593
9374
  * - `belowRouteIcons` — the signs give way to the route's own icons, each of which says something
9594
9375
  * the road cannot, but take precedence over the base map's labels.
9595
9376
  * - `aboveRouteIcons` — the signs give way to nothing, for a map whose subject is the limits.
@@ -9616,24 +9397,32 @@ type SectionSignPriority = 'belowMapLabels' | 'belowRouteIcons' | 'aboveRouteIco
9616
9397
  * `country` sections the display units decide the face and the unit, and an explicit {@link unit}
9617
9398
  * overrides both.
9618
9399
  *
9400
+ * A sign stands where the limit changes; {@link placement} repeats it down the stretch instead.
9619
9401
  * Signs scale with the zoom, as the ferry and toll-road icons do; {@link minzoom} decides how early
9620
9402
  * they appear at all.
9621
9403
  *
9622
9404
  * @group Routing
9623
9405
  */
9624
9406
  type SectionSignConfig = {
9407
+ /**
9408
+ * Where the signs are posted along the stretch.
9409
+ *
9410
+ * @defaultValue `'atChange'`, which is where the road posts its own.
9411
+ */
9412
+ placement?: SectionSignPlacement;
9625
9413
  /**
9626
9414
  * The lowest zoom the signs are drawn at.
9627
9415
  *
9628
- * @defaultValue 9, the zoom at which a sign is about a stretch of road a reader can see. Over
9629
- * a whole country the stretches fall in the same few pixels, so the few signs that survive the
9630
- * collision are an arbitrary sample rather than the limits of the drive.
9416
+ * @defaultValue 10, where a sign is about a stretch of road a reader can see. Further out the
9417
+ * stretches fall in the same few pixels and the surviving signs are an arbitrary sample.
9631
9418
  */
9632
9419
  minzoom?: number;
9633
9420
  /**
9634
- * Whether a sign gives way to the other icons the route draws, or takes precedence over them.
9421
+ * What a sign gives way to when another symbol wants the same spot.
9635
9422
  *
9636
- * @defaultValue `'belowRouteIcons'`
9423
+ * @defaultValue follows {@link placement}: `'belowRouteIcons'` under `atChange`, where the sign
9424
+ * is the only one posting that change; `'belowMapLabels'` under `along`, where the next repeat
9425
+ * posts it again.
9637
9426
  */
9638
9427
  priority?: SectionSignPriority;
9639
9428
  /**
@@ -9646,17 +9435,80 @@ type SectionSignConfig = {
9646
9435
  unit?: SectionSignUnit;
9647
9436
  };
9648
9437
  /**
9649
- * Appearance of one route section type.
9438
+ * How a border crossing's plaque is turned on the map.
9650
9439
  *
9651
- * @remarks
9652
- * The semantic tier for sections: enough to draw, recolour, resize or mute any section type the
9653
- * module draws, without writing a MapLibre layer spec — see {@link DrawnSectionType} for the
9654
- * types, and `layers.sections` for anything these knobs cannot express.
9440
+ * - `viewport` — level with the screen, however the map is rotated.
9441
+ * - `route` — turned to the route's bearing where it crosses, so the plaque runs along the road. It
9442
+ * is kept upright, so the label never reads upside down.
9655
9443
  *
9656
- * Which knobs a type takes is part of its type. `traffic` colours its line by `magnitudeOfDelay`
9657
- * and takes its icons from the incident data, so `sections.traffic.color` does not compile rather
9658
- * than compiling and drawing nothing. {@link sectionSupportsKnob} answers the same question at
9659
- * runtime, for a UI that builds its controls from the type.
9444
+ * @group Routing
9445
+ */
9446
+ type CountryCrossingAlignment = 'viewport' | 'route';
9447
+ /**
9448
+ * Appearance of the border crossings along a route.
9449
+ *
9450
+ * @remarks
9451
+ * A crossing is the seam between two consecutive `country` sections, so it is a point rather than a
9452
+ * stretch, and takes knobs of its own instead of a place in the section catalogue. Each is a plaque
9453
+ * naming both countries by their ISO 3166-1 alpha-2 codes in the direction of travel, `'ES → FR'`.
9454
+ *
9455
+ * The plaque follows the map's light/dark theme unless {@link color} or {@link textColor} says
9456
+ * otherwise, so it stays legible across a style change without being reconfigured.
9457
+ *
9458
+ * @example
9459
+ * ```typescript
9460
+ * const routes = await calculateRoute({ locations, sectionTypes: ['country'] });
9461
+ * await routing.showRoutes(routes);
9462
+ * ```
9463
+ *
9464
+ * @group Routing
9465
+ */
9466
+ type CountryCrossingConfig = {
9467
+ /**
9468
+ * Whether the crossings are drawn.
9469
+ *
9470
+ * @defaultValue `true`
9471
+ */
9472
+ visible?: boolean;
9473
+ /**
9474
+ * The lowest zoom a crossing is drawn at.
9475
+ *
9476
+ * @defaultValue 4, low enough for a continental route to show its borders while framed whole.
9477
+ */
9478
+ minzoom?: number;
9479
+ /**
9480
+ * The plaque colour behind the label.
9481
+ *
9482
+ * @defaultValue the SDK's near-black `'#1A2024'` on a light map, and the near-white `'#F1F3F5'`
9483
+ * on a dark one.
9484
+ */
9485
+ color?: string;
9486
+ /**
9487
+ * The label colour.
9488
+ *
9489
+ * @defaultValue whichever of the SDK's near-black and near-white reads on the plaque, so
9490
+ * setting {@link color} alone stays legible.
9491
+ */
9492
+ textColor?: string;
9493
+ /**
9494
+ * How the plaque is turned on the map.
9495
+ *
9496
+ * @defaultValue `'viewport'`
9497
+ */
9498
+ alignment?: CountryCrossingAlignment;
9499
+ };
9500
+ /**
9501
+ * Appearance of one route section type.
9502
+ *
9503
+ * @remarks
9504
+ * The semantic tier for sections: enough to draw, recolour, resize or mute any section type the
9505
+ * module draws, without writing a MapLibre layer spec — see {@link DrawnSectionType} for the
9506
+ * types, and `layers.sections` for anything these knobs cannot express.
9507
+ *
9508
+ * Which knobs a type takes is part of its type. `traffic` colours its line by `magnitudeOfDelay`
9509
+ * and takes its icons from the incident data, so `sections.traffic.color` does not compile rather
9510
+ * than compiling and drawing nothing. {@link sectionSupportsKnob} answers the same question at
9511
+ * runtime, for a UI that builds its controls from the type.
9660
9512
  *
9661
9513
  * @example
9662
9514
  * ```typescript
@@ -9745,6 +9597,13 @@ type RoutingModuleConfig = MapModuleCommonConfig & {
9745
9597
  */
9746
9598
  visible?: boolean;
9747
9599
  };
9600
+ /**
9601
+ * Appearance of the border crossings along the route.
9602
+ *
9603
+ * @remarks
9604
+ * Read off the route's `country` sections, so a route carrying none draws none.
9605
+ */
9606
+ countryCrossings?: CountryCrossingConfig;
9748
9607
  /**
9749
9608
  * Appearance of the route sections, keyed by section type.
9750
9609
  *
@@ -9781,9 +9640,10 @@ type RoutingModuleConfig = MapModuleCommonConfig & {
9781
9640
  * @param config - Optional routing module configuration to customize layer properties.
9782
9641
  * @param layerIDPrefix - Optional prefix to add to layer IDs for supporting multiple instances.
9783
9642
  * @param instanceIndex - Optional instance index for image ID suffixes.
9643
+ * @param lightDark - The map style's light/dark theme, which the country crossing plaque colours follow.
9784
9644
  * @ignore
9785
9645
  */
9786
- export declare const buildRoutingLayers: (config?: RoutingModuleConfig, layerIDPrefix?: string, instanceIndex?: number) => Required<RouteLayersConfig>;
9646
+ export declare const buildRoutingLayers: (config?: RoutingModuleConfig, layerIDPrefix?: string, instanceIndex?: number, lightDark?: LightDark) => Required<RouteLayersConfig>;
9787
9647
  /**
9788
9648
  * Default routing layers configuration. Calls routingLayers with no parameters.
9789
9649
  *
@@ -10201,6 +10061,63 @@ type DisplayRouteSummary = Feature<Point, DisplayRouteSummaryProps>;
10201
10061
  * @group Routing
10202
10062
  */
10203
10063
  type DisplayRouteSummaries = FeatureCollection<Point, DisplayRouteSummaryProps>;
10064
+ /**
10065
+ * Display-ready props of one border crossing.
10066
+ *
10067
+ * @group Routing
10068
+ */
10069
+ type DisplayCountryCrossingProps = DisplayRouteRelatedProps & {
10070
+ /** ISO 3166-1 alpha-2 code of the country the route leaves. */
10071
+ fromCountryCode: string;
10072
+ /** ISO 3166-1 alpha-2 code of the country the route enters. */
10073
+ toCountryCode: string;
10074
+ /** The label the plaque is stretched around — `'ES → FR'`. */
10075
+ label: string;
10076
+ /**
10077
+ * Bearing of the route where it crosses, in degrees clockwise from north.
10078
+ *
10079
+ * @remarks
10080
+ * What `alignment: 'route'` turns the plaque by. Present whatever the alignment, so switching
10081
+ * it is a restyle rather than a re-derive.
10082
+ */
10083
+ bearing: number;
10084
+ /**
10085
+ * `startPointIndex` of the `country` section the route leaves, which identifies that section
10086
+ * on {@link RouteProps.sections} even when the route enters the same country twice.
10087
+ */
10088
+ fromSectionStartPointIndex: number;
10089
+ /** `startPointIndex` of the `country` section the route enters. */
10090
+ toSectionStartPointIndex: number;
10091
+ };
10092
+ /**
10093
+ * GeoJSON feature of one border crossing, placed where the route enters the second country.
10094
+ *
10095
+ * @group Routing
10096
+ */
10097
+ type DisplayCountryCrossing = Feature<Point, DisplayCountryCrossingProps>;
10098
+ /**
10099
+ * A border crossing as an event hands it over: the drawn feature, plus the two `country` sections
10100
+ * it joins.
10101
+ *
10102
+ * @remarks
10103
+ * The sections are looked up on the route the crossing belongs to, so they are the same objects
10104
+ * `route.properties.sections.country` holds rather than copies. They are absent only when the route
10105
+ * that carried them is no longer shown.
10106
+ *
10107
+ * @group Routing
10108
+ */
10109
+ type CountryCrossingFeature = Feature<Point, DisplayCountryCrossingProps & {
10110
+ /** The `country` section the route leaves. */
10111
+ fromSection?: CountrySectionProps;
10112
+ /** The `country` section the route enters. */
10113
+ toSection?: CountrySectionProps;
10114
+ }>;
10115
+ /**
10116
+ * GeoJSON feature collection of the border crossings along the shown routes.
10117
+ *
10118
+ * @group Routing
10119
+ */
10120
+ type DisplayCountryCrossings = FeatureCollection<Point, DisplayCountryCrossingProps>;
10204
10121
  //#endregion
10205
10122
  //#region src/routing/types/guidance.d.ts
10206
10123
  /**
@@ -10583,6 +10500,7 @@ type RoutingSourcesWithLayers = { [K in SectionSourceKey<GeneratedSectionType>]:
10583
10500
  instructionLines: GeoJSONSourceWithLayers<DisplayInstructions>;
10584
10501
  instructionArrows: GeoJSONSourceWithLayers<DisplayInstructionArrows>;
10585
10502
  summaryBubbles: GeoJSONSourceWithLayers<DisplayRouteSummaries>;
10503
+ countryCrossings: GeoJSONSourceWithLayers<DisplayCountryCrossings>;
10586
10504
  };
10587
10505
  //#endregion
10588
10506
  //#region src/routing/types/showOptions.d.ts
@@ -10663,6 +10581,8 @@ export type RoutingEvents = CombinedEvents<MapGeoJSONFeature, RoutingModuleConfi
10663
10581
  chargingStops: UserEvents<RouteSection>;
10664
10582
  /** The summary bubbles shown against each alternative. */
10665
10583
  summaryBubbles: UserEvents<DisplayRouteSummary>;
10584
+ /** The border crossings along the route, each carrying the two `country` sections it joins. */
10585
+ countryCrossings: UserEvents<CountryCrossingFeature>;
10666
10586
  /** Traffic incidents on the route. */
10667
10587
  incidents: UserEvents<RouteSection<DisplayTrafficSectionProps>>;
10668
10588
  /** Sections the vehicle is restricted from. */
@@ -10791,6 +10711,29 @@ export declare class RoutingModule extends AbstractDataOwnedMapModule<RoutingSou
10791
10711
  * this instead of restyling the layer in place.
10792
10712
  */
10793
10713
  private showSpeedLimitSections;
10714
+ /** The colours the crossings draw with, which follow the map's theme unless configured. */
10715
+ private crossingColors;
10716
+ /**
10717
+ * What {@link applyCountryCrossingConfig} last painted the crossings with.
10718
+ *
10719
+ * @remarks
10720
+ * Tracked here rather than re-derived from `this.config`, because the theme is an input the
10721
+ * config cannot see: a style change moves the resolved colours while the config says the same
10722
+ * thing. Cleared when the sources are rebuilt, so a restored style repaints from scratch.
10723
+ */
10724
+ private appliedCrossingColors;
10725
+ /**
10726
+ * Brings the border crossings in line with a changed configuration.
10727
+ *
10728
+ * @remarks
10729
+ * The source is gated on `visible`, as the summary bubbles' is, so switching them back on
10730
+ * re-derives the features: a layer spec cannot put back data the source does not hold.
10731
+ *
10732
+ * Both colours are applied here rather than left to the layer spec: the plaque is an image, so
10733
+ * a new colour has to replace it, and the label's colour follows the map theme, which the spec
10734
+ * that built the layer cannot know about after a style change.
10735
+ */
10736
+ private applyCountryCrossingConfig;
10794
10737
  /**
10795
10738
  * Re-derives the posted signs when the unit they read in changed.
10796
10739
  *
@@ -10977,6 +10920,7 @@ export declare class RoutingModule extends AbstractDataOwnedMapModule<RoutingSou
10977
10920
  * - `instructionLines`: Turn-by-turn instruction lines
10978
10921
  * - `instructionArrows`: Instruction arrow markers
10979
10922
  * - `summaryBubbles`: Route summary popups
10923
+ * - `countryCrossings`: Border crossings along the route
10980
10924
  *
10981
10925
  * @example
10982
10926
  * ```typescript
@@ -11003,6 +10947,7 @@ export declare class RoutingModule extends AbstractDataOwnedMapModule<RoutingSou
11003
10947
  instructionLines: DisplayInstructions;
11004
10948
  instructionArrows: DisplayInstructionArrows;
11005
10949
  summaryBubbles: DisplayRouteSummaries;
10950
+ countryCrossings: DisplayCountryCrossings;
11006
10951
  carpoolSections: RouteSections | undefined;
11007
10952
  carTrainSections: RouteSections | undefined;
11008
10953
  importantRoadStretchSections: RouteSections | undefined;
@@ -11083,6 +11028,138 @@ type LayerSelector = {
11083
11028
  /** The layer id must contain none of these fragments (case-insensitive). */
11084
11029
  idExcludes?: string[];
11085
11030
  };
11031
+ /**
11032
+ * The style's sources, for selectors that constrain the source type.
11033
+ * @ignore
11034
+ */
11035
+ type StyleSources = Record<string, {
11036
+ type: string;
11037
+ }>;
11038
+ //#endregion
11039
+ //#region src/styling/mapColorCatalogue.d.ts
11040
+ /**
11041
+ * The ten semantic map colours — TomTom Map Maker's *Foundations* palette, under its own names and
11042
+ * in its own order. One name drives every layer and shade the style derives from it.
11043
+ *
11044
+ * | Name | Map Maker | Reaches |
11045
+ * |---|---|---|
11046
+ * | `land` | Land (base) | Map background and other bare-land features, influences admin borders/labels. Also used to derive all map colours if undefined. |
11047
+ * | `water` | Water | Waterbodies, waterways and other water features. Also influences glaciers, water labels and ferry lines. |
11048
+ * | `vegetation` | Vegetation | Forests and other land cover such as grass and shrubland. Also influences earth cover vegetation at smaller scales. |
11049
+ * | `park` | Park & Recreation | City parks and sport/recreation grounds. Also influences National Parks and other protected areas at smaller scales. |
11050
+ * | `artificial` | Artificial | Built-up-areas and man-made features such as landuse grounds and buildings. Also influences railways. |
11051
+ * | `roadMajor` | Major Road | Most important road classes, from motorways & trunks to primary roads. Also influences outline and tunnel colours. |
11052
+ * | `road` | Road | Less important road classes, from secondary/tertiary to streets and service roads. Also influences tunnel colours. |
11053
+ * | `roadOutline` | Road Outline | Road outlines for secondary/tertiary roads and minor classes. Also influences road labels and all other outline colours. |
11054
+ * | `label` | Label | Labels for capitals and other populated places/admin areas. Also influences border styling and all other label colours. |
11055
+ * | `labelOutline` | Label Outline | Outlines for populated places and admin area labels. Also influences border outlines and all other label halos. |
11056
+ *
11057
+ * @group Map Styling
11058
+ */
11059
+ type MapColorName = 'land' | 'water' | 'vegetation' | 'park' | 'artificial' | 'roadMajor' | 'road' | 'roadOutline' | 'label' | 'labelOutline';
11060
+ /**
11061
+ * A partial set of map colours for {@link StylingModule.setMapColors}: any subset of the ten,
11062
+ * each a CSS colour string.
11063
+ *
11064
+ * @example
11065
+ * ```typescript
11066
+ * styling.setMapColors({ land: '#f3f5f7', water: '#accbe2', roadMajor: '#a1b8ce', label: '#364659' });
11067
+ * ```
11068
+ *
11069
+ * @group Map Styling
11070
+ */
11071
+ type MapColors = Partial<Record<MapColorName, string>>;
11072
+ /**
11073
+ * Every paint property the styling knobs write a colour to. Listed once as values, since
11074
+ * `StylingModule` needs the set at runtime to pick MapLibre's paint setter over its layout one.
11075
+ * @ignore
11076
+ */
11077
+ 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"];
11078
+ /** @ignore */
11079
+ type PaintColorProperty = (typeof paintColorProperties)[number];
11080
+ /**
11081
+ * The ten map colour names, in Map Maker's Foundations order.
11082
+ *
11083
+ * @group Map Styling
11084
+ */
11085
+ export declare const mapColorNames: MapColorName[];
11086
+ //#endregion
11087
+ //#region src/styling/presets.d.ts
11088
+ /**
11089
+ * The styling presets the SDK ships: named bundles of knob settings for common intents. Each is data
11090
+ * over the knob catalogue, so a preset is exactly as durable as the knobs it sets, and an app can
11091
+ * start from one and adjust.
11092
+ * @ignore
11093
+ */
11094
+ declare const stylingPresets: {
11095
+ readonly 'data-viz': {
11096
+ readonly name: "Data visualisation";
11097
+ readonly description: "A quiet base for your own data on top: fewer labels and markers, thinner roads, no badges competing with the overlay.";
11098
+ readonly settings: {
11099
+ readonly 'labels.sizeFactor': 0.9;
11100
+ readonly 'symbols.sizeFactor': 0.9;
11101
+ readonly 'roads.widthFactor': 0.8;
11102
+ readonly 'roads.exitNumbers': false;
11103
+ readonly 'roads.shields': false;
11104
+ readonly 'roads.arrows': false;
11105
+ readonly 'pois.microMarkers': false;
11106
+ readonly 'pois.minZoom': 14;
11107
+ readonly 'buildings.3d': false;
11108
+ };
11109
+ };
11110
+ readonly 'night-driving': {
11111
+ readonly name: "Night driving";
11112
+ readonly description: "Bigger labels and shields, wider roads and traffic tubes, POIs out of the way until close up.";
11113
+ readonly settings: {
11114
+ readonly 'labels.sizeFactor': 1.2;
11115
+ readonly 'symbols.sizeFactor': 1.2;
11116
+ readonly 'roads.widthFactor': 1.2;
11117
+ readonly 'roads.exitNumbers': true;
11118
+ readonly 'roads.shields': true;
11119
+ readonly 'roads.arrows': true;
11120
+ readonly 'pois.minZoom': 13;
11121
+ readonly 'pois.microMarkers': false;
11122
+ readonly 'traffic.flow.widthFactor': 1.3;
11123
+ readonly 'buildings.3d': false;
11124
+ };
11125
+ };
11126
+ readonly minimal: {
11127
+ readonly name: "Minimal";
11128
+ readonly description: "The bare map: land, water, roads and the main place names. Everything decorative off.";
11129
+ readonly settings: {
11130
+ readonly 'labels.sizeFactor': 0.9;
11131
+ readonly 'roads.exitNumbers': false;
11132
+ readonly 'roads.shields': false;
11133
+ readonly 'roads.arrows': false;
11134
+ readonly 'roads.restricted': false;
11135
+ readonly 'roads.underConstruction': false;
11136
+ readonly 'buildings.footprints': false;
11137
+ readonly 'buildings.3d': false;
11138
+ readonly 'pois.microMarkers': false;
11139
+ readonly 'pois.minZoom': 16;
11140
+ };
11141
+ };
11142
+ readonly globe: {
11143
+ readonly name: "Globe";
11144
+ readonly description: "A globe with an atmosphere for the zoomed-out view; flattens to Mercator as you zoom in.";
11145
+ readonly settings: {
11146
+ readonly 'view.projection': "globe";
11147
+ readonly 'view.sky': true;
11148
+ };
11149
+ };
11150
+ };
11151
+ /**
11152
+ * The id of a styling preset, as accepted by {@link StylingModule.applyPreset}.
11153
+ *
11154
+ * @group Map Styling
11155
+ */
11156
+ type StylingPresetId = keyof typeof stylingPresets;
11157
+ /**
11158
+ * Every styling preset id, in catalogue order.
11159
+ *
11160
+ * @group Map Styling
11161
+ */
11162
+ export declare const stylingPresetIds: StylingPresetId[];
11086
11163
  //#endregion
11087
11164
  //#region src/styling/types/stylingTypes.d.ts
11088
11165
  /**
@@ -11092,10 +11169,11 @@ type LayerSelector = {
11092
11169
  * - `number`: an absolute number with a range, e.g. a minimum zoom.
11093
11170
  * - `toggle`: `true`/`false`, e.g. whether exit numbers are shown.
11094
11171
  * - `color`: a CSS colour string (`#rrggbb`, `hsl(…)`, `rgb(…)`, a named colour).
11172
+ * - `enum`: one of the knob's `options`, e.g. the projection.
11095
11173
  *
11096
11174
  * @group Map Styling
11097
11175
  */
11098
- export declare const stylingKnobKinds: readonly ["factor", "number", "toggle", "color"];
11176
+ export declare const stylingKnobKinds: readonly ["factor", "number", "toggle", "color", "enum"];
11099
11177
  /**
11100
11178
  * @group Map Styling
11101
11179
  */
@@ -11152,10 +11230,12 @@ type StylingKnobDescriptor = KnobDescriptor & {
11152
11230
  current: StylingKnobValue | undefined;
11153
11231
  /** The range of valid values, for `factor` and `number` knobs. */
11154
11232
  range?: StylingKnobRange;
11233
+ /** The valid values, for `enum` knobs. */
11234
+ options?: readonly string[];
11155
11235
  /**
11156
11236
  * Whether the knob has anything to work on in the loaded style. `false` means setting it would
11157
- * do nothing — the SDK also warns once in the console when that happens. Check this before
11158
- * offering the knob in a UI or to an agent.
11237
+ * do nothing, and the SDK also warns once in the console when that happens. Check this before
11238
+ * offering the knob in a UI or to an agent. Map-level knobs are always available.
11159
11239
  */
11160
11240
  available: boolean;
11161
11241
  /** Which styles the knob works on; see {@link stylingKnobAppliesTo}. */
@@ -11169,6 +11249,22 @@ type StylingKnobDescriptor = KnobDescriptor & {
11169
11249
  */
11170
11250
  type StylingCatalogue = {
11171
11251
  knobs: StylingKnobDescriptor[];
11252
+ /** The presets {@link StylingModule.applyPreset} accepts, with the settings each one applies. */
11253
+ presets: StylingPresetDescriptor[];
11254
+ };
11255
+ /**
11256
+ * A named bundle of knob settings — TomTom's cartographic opinions, in code. Apply one with
11257
+ * {@link StylingModule.applyPreset}.
11258
+ *
11259
+ * @group Map Styling
11260
+ */
11261
+ type StylingPresetDescriptor = {
11262
+ id: StylingPresetId;
11263
+ name: string;
11264
+ /** One line on the use case the preset serves. */
11265
+ description: string;
11266
+ /** The knob values the preset applies; the same shape {@link StylingModule.applyConfig} takes. */
11267
+ settings: StylingSettings;
11172
11268
  };
11173
11269
  /**
11174
11270
  * A serializable set of styling knob values — what {@link StylingModule.getConfig} returns and
@@ -11193,7 +11289,15 @@ type StylingSettings = MapModuleCommonConfig & { [K in StylingKnobId]?: StylingK
11193
11289
  /** @ignore */
11194
11290
  type ScalableProperty = 'text-size' | 'icon-size' | 'line-width';
11195
11291
  /** @ignore */
11196
- type ColorProperty = 'line-color' | 'text-color' | 'text-halo-color';
11292
+ type ColorProperty = Extract<PaintColorProperty, 'line-color' | 'text-color' | 'text-halo-color' | 'hillshade-shadow-color' | 'hillshade-highlight-color' | 'hillshade-accent-color'>;
11293
+ /**
11294
+ * Paint properties set as plain literals by the `paintLiteral` mechanism. Listed as values for the
11295
+ * same reason as `paintColorProperties`.
11296
+ * @ignore
11297
+ */
11298
+ declare const literalPaintProperties: readonly ["hillshade-method", "hillshade-illumination-direction", "hillshade-exaggeration"];
11299
+ /** @ignore */
11300
+ type LiteralProperty = (typeof literalPaintProperties)[number];
11197
11301
  /**
11198
11302
  * How a knob reaches the style. A knob may use several (e.g. text and icon size together).
11199
11303
  * @ignore
@@ -11225,19 +11329,55 @@ type KnobMechanism =
11225
11329
  type: 'minZoom';
11226
11330
  layers: LayerSelector[];
11227
11331
  } |
11332
+ /** Sets the maximum zoom of the matched layers. */
11333
+ {
11334
+ type: 'maxZoom';
11335
+ layers: LayerSelector[];
11336
+ } |
11337
+ /** M2 — sets a paint property to the knob's value as a plain literal on the matched layers. */
11338
+ {
11339
+ type: 'paintLiteral';
11340
+ property: LiteralProperty;
11341
+ layers: LayerSelector[];
11342
+ } |
11228
11343
  /** Shifts the `["-", ["zoom"], offset]` density term inside the matched layers' filters. */
11229
11344
  {
11230
11345
  type: 'zoomOffset';
11231
11346
  layers: LayerSelector[];
11347
+ } |
11348
+ /** Map-level: the projection the whole map is drawn in. */
11349
+ {
11350
+ type: 'projection';
11351
+ } |
11352
+ /** Map-level: the sky/atmosphere (its colours come from the sibling colour knobs). */
11353
+ {
11354
+ type: 'sky';
11355
+ } |
11356
+ /** Map-level: the colour behind the map canvas, which a globe leaves visible around the planet. */
11357
+ {
11358
+ type: 'space';
11359
+ } |
11360
+ /**
11361
+ * One of the ten semantic map colours: re-derives every literal it governs from the new colour,
11362
+ * keeping each one's HSL offset from the style's own base (the anchor).
11363
+ */
11364
+ {
11365
+ type: 'mapColor';
11366
+ color: MapColorName;
11232
11367
  };
11233
11368
  /** @ignore */
11234
11369
  type KnobDefinition = {
11235
11370
  kind: StylingKnobKind;
11236
11371
  description: string;
11237
11372
  range?: StylingKnobRange;
11373
+ /** The valid values of an `enum` knob. */
11374
+ options?: readonly string[];
11238
11375
  appliesTo: StylingKnobAppliesTo;
11239
11376
  mechanisms: KnobMechanism[];
11240
11377
  };
11378
+ type KnobDefinitionOf<KIND extends StylingKnobKind> = KnobDefinition & {
11379
+ kind: KIND;
11380
+ };
11241
11381
  /**
11242
11382
  * The styling knob catalogue: what the SDK can restyle on a TomTom standard style, and how.
11243
11383
  *
@@ -11246,10 +11386,125 @@ type KnobDefinition = {
11246
11386
  * @ignore
11247
11387
  */
11248
11388
  declare const knobDefinitions: {
11249
- readonly 'labels.sizeFactor': KnobDefinition;
11250
- readonly 'symbols.sizeFactor': KnobDefinition;
11251
- readonly 'roads.widthFactor': KnobDefinition;
11252
- readonly 'pois.sizeFactor': KnobDefinition;
11389
+ readonly 'hillshade.method': {
11390
+ readonly kind: "enum";
11391
+ readonly description: "How the relief is shaded: standard (one light), basic, igor (softer), combined, or multidirectional (four lights).";
11392
+ readonly options: readonly ["standard", "basic", "igor", "combined", "multidirectional"];
11393
+ readonly appliesTo: "tomtom-styles";
11394
+ readonly mechanisms: [{
11395
+ readonly type: "paintLiteral";
11396
+ readonly property: "hillshade-method";
11397
+ readonly layers: [LayerSelector];
11398
+ }];
11399
+ };
11400
+ readonly 'hillshade.lightDirection': {
11401
+ readonly kind: "number";
11402
+ readonly description: "Direction the light comes from, in degrees clockwise from north (335 is the cartographic default).";
11403
+ readonly range: {
11404
+ readonly min: 0;
11405
+ readonly max: 359;
11406
+ readonly step: 1;
11407
+ };
11408
+ readonly appliesTo: "tomtom-styles";
11409
+ readonly mechanisms: [{
11410
+ readonly type: "paintLiteral";
11411
+ readonly property: "hillshade-illumination-direction";
11412
+ readonly layers: [LayerSelector];
11413
+ }];
11414
+ };
11415
+ readonly 'hillshade.exaggeration': {
11416
+ readonly kind: "number";
11417
+ 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.";
11418
+ readonly range: {
11419
+ readonly min: 0;
11420
+ readonly max: 1;
11421
+ readonly step: 0.05;
11422
+ };
11423
+ readonly appliesTo: "tomtom-styles";
11424
+ readonly mechanisms: [{
11425
+ readonly type: "paintLiteral";
11426
+ readonly property: "hillshade-exaggeration";
11427
+ readonly layers: [LayerSelector];
11428
+ }];
11429
+ };
11430
+ readonly 'hillshade.maxZoom': {
11431
+ readonly kind: "number";
11432
+ readonly description: "Zoom level up to which the shading is drawn (the standard styles stop at 13; 22 keeps it at every zoom).";
11433
+ readonly range: {
11434
+ readonly min: 10;
11435
+ readonly max: 22;
11436
+ readonly step: 1;
11437
+ };
11438
+ readonly appliesTo: "tomtom-styles";
11439
+ readonly mechanisms: [{
11440
+ readonly type: "maxZoom";
11441
+ readonly layers: [LayerSelector];
11442
+ }];
11443
+ };
11444
+ readonly 'hillshade.shadowColor': KnobDefinitionOf<"color">;
11445
+ readonly 'hillshade.highlightColor': KnobDefinitionOf<"color">;
11446
+ readonly 'hillshade.accentColor': KnobDefinitionOf<"color">;
11447
+ readonly 'view.projection': {
11448
+ readonly kind: "enum";
11449
+ readonly description: "How the map is drawn: flat Mercator or a globe. The globe flattens to Mercator between zoom 11 and 12 by design.";
11450
+ readonly options: readonly ["mercator", "globe"];
11451
+ readonly appliesTo: "any-style";
11452
+ readonly mechanisms: [{
11453
+ readonly type: "projection";
11454
+ }];
11455
+ };
11456
+ readonly 'view.sky': {
11457
+ readonly kind: "toggle";
11458
+ 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.";
11459
+ readonly appliesTo: "any-style";
11460
+ readonly mechanisms: [{
11461
+ readonly type: "sky";
11462
+ }];
11463
+ };
11464
+ readonly 'view.skyColor': {
11465
+ readonly kind: "color";
11466
+ 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.";
11467
+ readonly appliesTo: "any-style";
11468
+ readonly mechanisms: [{
11469
+ readonly type: "sky";
11470
+ }];
11471
+ };
11472
+ readonly 'view.horizonColor': {
11473
+ readonly kind: "color";
11474
+ 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.";
11475
+ readonly appliesTo: "any-style";
11476
+ readonly mechanisms: [{
11477
+ readonly type: "sky";
11478
+ }];
11479
+ };
11480
+ readonly 'view.spaceColor': {
11481
+ readonly kind: "color";
11482
+ 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.";
11483
+ readonly appliesTo: "any-style";
11484
+ readonly mechanisms: [{
11485
+ readonly type: "space";
11486
+ }];
11487
+ };
11488
+ readonly "basemap.land": KnobDefinitionOf<"toggle">;
11489
+ readonly "basemap.water": KnobDefinitionOf<"toggle">;
11490
+ readonly "basemap.roads": KnobDefinitionOf<"toggle">;
11491
+ readonly "basemap.railways": KnobDefinitionOf<"toggle">;
11492
+ readonly "basemap.ferries": KnobDefinitionOf<"toggle">;
11493
+ readonly "basemap.borders": KnobDefinitionOf<"toggle">;
11494
+ readonly "basemap.natureLabels": KnobDefinitionOf<"toggle">;
11495
+ readonly "basemap.roadLabels": KnobDefinitionOf<"toggle">;
11496
+ readonly "basemap.roadShields": KnobDefinitionOf<"toggle">;
11497
+ readonly "basemap.houseNumbers": KnobDefinitionOf<"toggle">;
11498
+ readonly "basemap.smallerTownLabels": KnobDefinitionOf<"toggle">;
11499
+ readonly "basemap.stateLabels": KnobDefinitionOf<"toggle">;
11500
+ readonly "basemap.cityLabels": KnobDefinitionOf<"toggle">;
11501
+ readonly "basemap.allPlaceLabels": KnobDefinitionOf<"toggle">;
11502
+ readonly "basemap.capitalLabels": KnobDefinitionOf<"toggle">;
11503
+ readonly "basemap.countryLabels": KnobDefinitionOf<"toggle">;
11504
+ readonly 'labels.sizeFactor': KnobDefinitionOf<"factor">;
11505
+ readonly 'symbols.sizeFactor': KnobDefinitionOf<"factor">;
11506
+ readonly 'roads.widthFactor': KnobDefinitionOf<"factor">;
11507
+ readonly 'pois.sizeFactor': KnobDefinitionOf<"factor">;
11253
11508
  readonly 'pois.minZoom': {
11254
11509
  readonly kind: "number";
11255
11510
  readonly description: "Zoom level from which base-map POIs appear (the style default is 6).";
@@ -11286,27 +11541,37 @@ declare const knobDefinitions: {
11286
11541
  readonly layers: [LayerSelector];
11287
11542
  }];
11288
11543
  };
11289
- readonly 'pois.labelColor': KnobDefinition;
11290
- readonly 'pois.labelOutlineColor': KnobDefinition;
11291
- readonly 'pois.microMarkers': KnobDefinition;
11292
- readonly 'roads.exitNumbers': KnobDefinition;
11293
- readonly 'roads.shields': KnobDefinition;
11294
- readonly 'roads.arrows': KnobDefinition;
11295
- readonly 'roads.restricted': KnobDefinition;
11296
- readonly 'roads.underConstruction': KnobDefinition;
11297
- readonly 'buildings.footprints': KnobDefinition;
11298
- readonly 'buildings.3d': KnobDefinition;
11299
- readonly 'traffic.flow.freeColor': KnobDefinition;
11300
- readonly 'traffic.flow.slowColor': KnobDefinition;
11301
- readonly 'traffic.flow.queueingColor': KnobDefinition;
11302
- readonly 'traffic.flow.stationaryColor': KnobDefinition;
11303
- readonly 'traffic.flow.closedColor': KnobDefinition;
11304
- readonly 'traffic.flow.widthFactor': KnobDefinition;
11305
- readonly 'traffic.incidents.minorColor': KnobDefinition;
11306
- readonly 'traffic.incidents.moderateColor': KnobDefinition;
11307
- readonly 'traffic.incidents.majorColor': KnobDefinition;
11308
- readonly 'traffic.incidents.closedColor': KnobDefinition;
11309
- readonly 'traffic.incidents.widthFactor': KnobDefinition;
11544
+ readonly 'pois.labelColor': KnobDefinitionOf<"color">;
11545
+ readonly 'pois.labelOutlineColor': KnobDefinitionOf<"color">;
11546
+ readonly 'pois.microMarkers': KnobDefinitionOf<"toggle">;
11547
+ readonly 'roads.exitNumbers': KnobDefinitionOf<"toggle">;
11548
+ readonly 'roads.shields': KnobDefinitionOf<"toggle">;
11549
+ readonly 'roads.arrows': KnobDefinitionOf<"toggle">;
11550
+ readonly 'roads.restricted': KnobDefinitionOf<"toggle">;
11551
+ readonly 'roads.underConstruction': KnobDefinitionOf<"toggle">;
11552
+ readonly 'buildings.footprints': KnobDefinitionOf<"toggle">;
11553
+ readonly 'buildings.3d': KnobDefinitionOf<"toggle">;
11554
+ readonly 'traffic.flow.freeColor': KnobDefinitionOf<"color">;
11555
+ readonly 'traffic.flow.slowColor': KnobDefinitionOf<"color">;
11556
+ readonly 'traffic.flow.queueingColor': KnobDefinitionOf<"color">;
11557
+ readonly 'traffic.flow.stationaryColor': KnobDefinitionOf<"color">;
11558
+ readonly 'traffic.flow.closedColor': KnobDefinitionOf<"color">;
11559
+ readonly 'traffic.flow.widthFactor': KnobDefinitionOf<"factor">;
11560
+ readonly 'traffic.incidents.minorColor': KnobDefinitionOf<"color">;
11561
+ readonly 'traffic.incidents.moderateColor': KnobDefinitionOf<"color">;
11562
+ readonly 'traffic.incidents.majorColor': KnobDefinitionOf<"color">;
11563
+ readonly 'traffic.incidents.closedColor': KnobDefinitionOf<"color">;
11564
+ readonly 'traffic.incidents.widthFactor': KnobDefinitionOf<"factor">;
11565
+ readonly 'colors.land': KnobDefinitionOf<"color">;
11566
+ readonly 'colors.water': KnobDefinitionOf<"color">;
11567
+ readonly 'colors.vegetation': KnobDefinitionOf<"color">;
11568
+ readonly 'colors.park': KnobDefinitionOf<"color">;
11569
+ readonly 'colors.artificial': KnobDefinitionOf<"color">;
11570
+ readonly 'colors.roadMajor': KnobDefinitionOf<"color">;
11571
+ readonly 'colors.road': KnobDefinitionOf<"color">;
11572
+ readonly 'colors.roadOutline': KnobDefinitionOf<"color">;
11573
+ readonly 'colors.label': KnobDefinitionOf<"color">;
11574
+ readonly 'colors.labelOutline': KnobDefinitionOf<"color">;
11310
11575
  };
11311
11576
  /**
11312
11577
  * The id of a styling knob — see {@link StylingModule.describe} for what each one does.
@@ -11320,7 +11585,20 @@ type StylingKnobId = keyof typeof knobDefinitions;
11320
11585
  * @group Map Styling
11321
11586
  */
11322
11587
  export declare const stylingKnobIds: StylingKnobId[];
11323
- type ValueOfKind<KIND extends StylingKnobKind> = KIND extends 'toggle' ? boolean : KIND extends 'color' ? string : number;
11588
+ /**
11589
+ * The id of a styling knob that holds a colour — every colour the styling module can name, and so
11590
+ * resolve against whichever style is loaded.
11591
+ *
11592
+ * @group Map Styling
11593
+ */
11594
+ type StylingColorKnobId = { [ID in StylingKnobId]: (typeof knobDefinitions)[ID]['kind'] extends 'color' ? ID : never; }[StylingKnobId];
11595
+ /**
11596
+ * Every colour knob id, in catalogue order.
11597
+ *
11598
+ * @group Map Styling
11599
+ */
11600
+ export declare const stylingColorKnobIds: StylingColorKnobId[];
11601
+ type ValueOfKind<KIND extends StylingKnobKind> = KIND extends 'toggle' ? boolean : KIND extends 'color' | 'enum' ? string : number;
11324
11602
  /**
11325
11603
  * The value type a given styling knob takes.
11326
11604
  *
@@ -11328,6 +11606,112 @@ type ValueOfKind<KIND extends StylingKnobKind> = KIND extends 'toggle' ? boolean
11328
11606
  */
11329
11607
  type StylingKnobValueOf<ID extends StylingKnobId> = ValueOfKind<(typeof knobDefinitions)[ID]['kind']>;
11330
11608
  //#endregion
11609
+ //#region src/styling/layerQuery.d.ts
11610
+ /**
11611
+ * How {@link StylingModule.layers} picks style layers: by the SDK's base-map group taxonomy, layer
11612
+ * type, vector-tile source layer and case-insensitive id fragments. Every constraint given must hold.
11613
+ *
11614
+ * @group Map Styling
11615
+ */
11616
+ type LayerQuery = {
11617
+ /** A base-map layer group, the same vocabulary as {@link BaseMapModule}. */
11618
+ group?: BaseMapLayerGroupName;
11619
+ /** The style's own `metadata.group` values, for groups the SDK does not name. */
11620
+ metadataGroups?: string[];
11621
+ /** Layer types (`line`, `fill`, `symbol`, …). */
11622
+ layerTypes?: LayerSpecification['type'][];
11623
+ /** Vector-tile source layers (`roads`, `places`, `poi`, …). */
11624
+ sourceLayers?: string[];
11625
+ /** The layer id must contain one of these (case-insensitive). */
11626
+ idIncludes?: string[];
11627
+ /** The layer id must contain none of these (case-insensitive). */
11628
+ idExcludes?: string[];
11629
+ };
11630
+ type PropertyOverride = {
11631
+ kind: 'paint' | 'layout';
11632
+ property: string;
11633
+ value: unknown;
11634
+ };
11635
+ /**
11636
+ * The advanced tier of the styling module: raw MapLibre paint, layout and filter edits over a
11637
+ * query of style layers, re-applied across style switches.
11638
+ *
11639
+ * @remarks
11640
+ * **This is the version-coupled tier.** Layer ids, expressions and even which layers exist belong to
11641
+ * the loaded style version, so an edit may match nothing on the next one: the selection is then empty
11642
+ * and the SDK warns once. Prefer a knob or {@link StylingModule.setMapColors} where one fits.
11643
+ *
11644
+ * Overrides are not part of `getConfig()`: they are edits to this style, not portable settings.
11645
+ *
11646
+ * @example
11647
+ * ```typescript
11648
+ * styling.layers.query({ group: 'roadLabels' }).setPaint({ 'text-color': '#93c5fd' });
11649
+ * styling.layers.query({ metadataGroups: ['water'], layerTypes: ['fill'] }).setPaint({ 'fill-opacity': 0.6 });
11650
+ * styling.layers.query({ idIncludes: ['railway'] }).setVisible(false);
11651
+ * styling.layers.query({ group: 'roadLabels' }).reset();
11652
+ * ```
11653
+ *
11654
+ * @group Map Styling
11655
+ */
11656
+ export declare class LayerSelection {
11657
+ private readonly registry;
11658
+ readonly query: LayerQuery;
11659
+ /**
11660
+ * @ignore
11661
+ */
11662
+ constructor(registry: LayerOverrides, query: LayerQuery);
11663
+ /**
11664
+ * The ids of the layers the query matches in the loaded style, in draw order. Empty when the
11665
+ * style has no such layers.
11666
+ */
11667
+ get layerIds(): string[];
11668
+ /** Sets paint properties on every matched layer. */
11669
+ setPaint(paint: Partial<AllPaintProperties>): this;
11670
+ /** Sets layout properties on every matched layer. */
11671
+ setLayout(layout: Partial<AllLayoutProperties>): this;
11672
+ /**
11673
+ * Replaces the filter the style gave every matched layer. The filters other modules add, such as
11674
+ * POI categories and traffic filters, still narrow it.
11675
+ */
11676
+ setFilter(filter: FilterSpecification | undefined): this;
11677
+ /** Shows or hides every matched layer. */
11678
+ setVisible(visible: boolean): this;
11679
+ /** Removes every override made through the styling module on the matched layers. */
11680
+ reset(): this;
11681
+ }
11682
+ /**
11683
+ * The styling module's registry of raw layer overrides: resolves queries against the loaded style,
11684
+ * applies overrides, remembers what each property was before, and re-applies after a style switch.
11685
+ * Filters go through the map's {@link LayerFilterComposer}, which holds the style's own filter.
11686
+ * @ignore
11687
+ */
11688
+ declare class LayerOverrides {
11689
+ private readonly mapLibreMap;
11690
+ private readonly filterComposer;
11691
+ private readonly warn;
11692
+ private layers;
11693
+ private sources;
11694
+ private readonly properties;
11695
+ private readonly filters;
11696
+ constructor(mapLibreMap: Map, filterComposer: LayerFilterComposer, warn: (key: string, message: string) => void);
11697
+ /** Points the registry at a freshly loaded style; overrides are kept and re-applied by {@link reapply}. */
11698
+ index(layers: LayerSpecification[], sources: StyleSources): void;
11699
+ /** Forgets every override (a clean style switch, which also clears the filter composer). */
11700
+ clear(): void;
11701
+ resolve(query: LayerQuery): string[];
11702
+ override(query: LayerQuery, override: PropertyOverride): void;
11703
+ overrideFilter(query: LayerQuery, filter: FilterSpecification | undefined): void;
11704
+ reset(query: LayerQuery): void;
11705
+ /**
11706
+ * Lands every override again on top of the current style. What an override replaces is re-read
11707
+ * only where something else wrote under it since (a new style, or a knob on the same property);
11708
+ * a layer still carrying the override keeps the value it replaced.
11709
+ */
11710
+ reapply(): void;
11711
+ private read;
11712
+ private write;
11713
+ }
11714
+ //#endregion
11331
11715
  //#region src/styling/StylingModule.d.ts
11332
11716
  /**
11333
11717
  * Event surface of {@link StylingModule}: it owns no map features, so only the lifecycle half is
@@ -11385,10 +11769,17 @@ export type StylingEvents = CombinedEvents<MapGeoJSONFeature, StylingSettings, n
11385
11769
  */
11386
11770
  export declare class StylingModule extends AbstractStyleOwnedMapModule<Record<string, never>, StylingSettings> {
11387
11771
  private originalValues;
11772
+ private mapLevelState;
11388
11773
  private styleSources;
11389
11774
  private resolved;
11390
11775
  private scaleKnobsByTarget;
11776
+ private mapColorTargetsByKey;
11777
+ private mapColorTargetsByKnob;
11778
+ private mapColorAnchors;
11391
11779
  private warned;
11780
+ private reindexed;
11781
+ private originalSpaceColor;
11782
+ private layerOverrides;
11392
11783
  /**
11393
11784
  * Retrieves the styling module of the given map, creating it on first use.
11394
11785
  *
@@ -11420,6 +11811,23 @@ export declare class StylingModule extends AbstractStyleOwnedMapModule<Record<st
11420
11811
  * @ignore
11421
11812
  */
11422
11813
  protected _applyConfig(settings: StylingSettings | undefined): StylingSettings | undefined;
11814
+ /**
11815
+ * @ignore
11816
+ */
11817
+ protected discardShownData(): void;
11818
+ /**
11819
+ * The advanced tier: raw MapLibre paint, layout and filter edits over a query of style layers,
11820
+ * re-applied across style switches. Version-coupled by nature — see {@link LayerSelection} for
11821
+ * the terms — so prefer a knob or {@link setMapColors} wherever one covers the intent.
11822
+ *
11823
+ * @example
11824
+ * ```typescript
11825
+ * styling.layers.query({ group: 'roadLabels' }).setPaint({ 'text-color': '#93c5fd' });
11826
+ * ```
11827
+ */
11828
+ get layers(): {
11829
+ query: (query: LayerQuery) => LayerSelection;
11830
+ };
11423
11831
  /**
11424
11832
  * The styling catalogue for the loaded style: every knob with its kind, range, default, current
11425
11833
  * value and how many layers it reaches.
@@ -11435,6 +11843,27 @@ export declare class StylingModule extends AbstractStyleOwnedMapModule<Record<st
11435
11843
  * ```
11436
11844
  */
11437
11845
  describe(): StylingCatalogue;
11846
+ /**
11847
+ * Applies a preset: a named bundle of knob settings the SDK ships for a common intent
11848
+ * (`data-viz`, `night-driving`, `minimal`, `globe`). See `describe().presets` for
11849
+ * what each one sets.
11850
+ *
11851
+ * @param id - The preset to apply.
11852
+ * @param options - `merge: true` lays the preset over the current settings instead of replacing
11853
+ * them (the default), so knobs the preset does not mention keep their values.
11854
+ * @throws `Error` for an unknown preset id.
11855
+ *
11856
+ * @example
11857
+ * ```typescript
11858
+ * styling.applyPreset('data-viz');
11859
+ * styling.set('labels.sizeFactor', 1.1); // then adjust
11860
+ *
11861
+ * styling.applyPreset('globe', { merge: true }); // keep the rest, switch to a globe with a sky
11862
+ * ```
11863
+ */
11864
+ applyPreset(id: StylingPresetId, options?: {
11865
+ merge?: boolean;
11866
+ }): void;
11438
11867
  /**
11439
11868
  * The value a knob currently has: the override if one is set, otherwise the style's own default.
11440
11869
  *
@@ -11477,6 +11906,39 @@ export declare class StylingModule extends AbstractStyleOwnedMapModule<Record<st
11477
11906
  * ```
11478
11907
  */
11479
11908
  reset(id?: StylingKnobId): void;
11909
+ /**
11910
+ * Recolours the whole base map with up to ten semantic colours in one call — Map Maker's
11911
+ * Foundations palette, each listed with what it reaches under {@link MapColorName}. Partial
11912
+ * objects are fine; colours not given stay as they are.
11913
+ *
11914
+ * @remarks
11915
+ * Each colour re-derives every shade the style built from it — a trunk variant, an outline, a
11916
+ * tunnel — at the style's own HSL offset, so those relationships survive the recolour. The ten
11917
+ * are also the `colors.*` knobs, so `describe()`, `reset` and settings persistence apply.
11918
+ *
11919
+ * Those offsets come off the loaded style, which makes a palette a recolour and not an
11920
+ * inversion: dark land over `standardLight` pushes the derived shades to the ends of their
11921
+ * range, so switch to `standardDark` first.
11922
+ *
11923
+ * @param colors - The colours to set, as CSS colour strings.
11924
+ * @throws `RangeError` for a value that is not a colour; `Error` for an unknown colour name.
11925
+ *
11926
+ * @example
11927
+ * ```typescript
11928
+ * styling.setMapColors({ land: '#f3f5f7', water: '#accbe2', roadMajor: '#a1b8ce', label: '#364659' });
11929
+ * styling.reset('colors.roadMajor'); // one colour back to the style
11930
+ * ```
11931
+ */
11932
+ setMapColors(colors: MapColors): void;
11933
+ /**
11934
+ * The style as currently rendered — the loaded style with every knob applied — as a MapLibre
11935
+ * style specification, to save, diff, serve yourself, or load back as a custom style.
11936
+ *
11937
+ * @remarks
11938
+ * It includes whatever the SDK's data modules (places, routes) have on the map, and its tile
11939
+ * URLs carry the API key the map was created with: strip or rotate it before publishing.
11940
+ */
11941
+ exportStyle(): StyleSpecification;
11480
11942
  /**
11481
11943
  * Lifecycle events of this module. The module owns no map features, so there are no user
11482
11944
  * interaction events; `config-change` fires with the full settings after every knob change.
@@ -11491,21 +11953,167 @@ export declare class StylingModule extends AbstractStyleOwnedMapModule<Record<st
11491
11953
  private resolveMechanism;
11492
11954
  private capture;
11493
11955
  private originalValueOf;
11956
+ private resolveMapColor;
11494
11957
  private refreshKnob;
11495
11958
  private refreshMechanism;
11959
+ private refreshLayer;
11960
+ private refreshSpace;
11961
+ private defaultSpaceColor;
11962
+ private refreshMapColorProperty;
11963
+ private refreshProjection;
11964
+ private refreshSky;
11496
11965
  private refreshVisibility;
11497
- private refreshMinZoom;
11966
+ private refreshZoomBound;
11967
+ private styleZoomBound;
11498
11968
  private refreshZoomOffset;
11499
11969
  private refreshScaledProperty;
11500
11970
  private refreshColor;
11501
11971
  private setProperty;
11502
11972
  private describeKnob;
11503
11973
  private defaultOf;
11974
+ private mapLevelDefaultOf;
11504
11975
  private assertKnob;
11505
11976
  private validate;
11506
11977
  private warnOnce;
11507
11978
  }
11508
11979
  //#endregion
11980
+ //#region src/terrain/types/terrainModuleConfig.d.ts
11981
+ /**
11982
+ * Configuration of the {@link TerrainModule}: the two ways it draws the relief of the style's
11983
+ * elevation data.
11984
+ *
11985
+ * @remarks
11986
+ * Unset, the hillshade is hidden like the other style parts the SDK adds (traffic flow and
11987
+ * incidents), and the surface is left as the map draws it: flat on TomTom styles. So
11988
+ * `resetConfig()` returns a TomTom style to flat and unshaded.
11989
+ *
11990
+ * @example
11991
+ * ```typescript
11992
+ * const config: TerrainModuleConfig = { hillshade: true, elevation: true, elevationExaggeration: 1.5 };
11993
+ * ```
11994
+ *
11995
+ * @group Terrain
11996
+ */
11997
+ type TerrainModuleConfig = MapModuleCommonConfig & {
11998
+ /**
11999
+ * Shows the hillshade: light and shadow on the map surface that reveal hills, valleys and
12000
+ * mountains, at any camera pitch. Its look is set by the `hillshade.*` knobs of {@link StylingModule}.
12001
+ *
12002
+ * @default false
12003
+ */
12004
+ hillshade?: boolean;
12005
+ /**
12006
+ * Raises the map surface to the elevation data in 3D, or flattens it. Shows best with a
12007
+ * pitched camera.
12008
+ *
12009
+ * @default The map's own terrain, if its style or MapLibre code raised one; none on TomTom styles.
12010
+ */
12011
+ elevation?: boolean;
12012
+ /**
12013
+ * Vertical scaling of the 3D surface: `1` is true elevation, higher values emphasise the
12014
+ * relief. Kept while `elevation` is off, so turning it back on restores it.
12015
+ *
12016
+ * @default 1
12017
+ */
12018
+ elevationExaggeration?: number;
12019
+ };
12020
+ //#endregion
12021
+ //#region src/terrain/TerrainModule.d.ts
12022
+ /**
12023
+ * The style source this module draws from: the raster-dem elevation source of the hillshade
12024
+ * style part, with its hillshade layers.
12025
+ */
12026
+ type TerrainSourcesWithLayers = {
12027
+ hillshade: StyleSourceWithLayers;
12028
+ };
12029
+ /**
12030
+ * Map module for the terrain relief: hillshade shading and the 3D surface, both drawn from the
12031
+ * elevation data of the map style.
12032
+ *
12033
+ * @remarks
12034
+ * - **Hillshade** shades slopes on the flat map, so the relief reads at any pitch.
12035
+ * - **Elevation** raises the map surface in 3D, which a pitched camera shows. Combined with the
12036
+ * hillshade, a slope stays readable where the camera flattens it.
12037
+ *
12038
+ * `get()` adds the elevation style part when the style lacks it, and the module restores both
12039
+ * after every style change. The 3D surface reads its own copy of the elevation source,
12040
+ * {@link TERRAIN_SOURCE_ID}.
12041
+ *
12042
+ * @example
12043
+ * ```typescript
12044
+ * const terrain = await TerrainModule.get(map, { hillshade: true, elevation: true, elevationExaggeration: 1.3 });
12045
+ * terrain.setElevationExaggeration(2);
12046
+ * terrain.setElevationEnabled(false); // flat again, still shaded
12047
+ * ```
12048
+ *
12049
+ * @see [Terrain Guide](https://docs.tomtom.com/maps-sdk-js/guides/map/terrain)
12050
+ *
12051
+ * @group Terrain
12052
+ */
12053
+ export declare class TerrainModule extends AbstractStyleOwnedMapModule<TerrainSourcesWithLayers, TerrainModuleConfig> {
12054
+ private mapTerrain;
12055
+ private overridesMapTerrain;
12056
+ /**
12057
+ * Retrieves the terrain module of the given map, adding the elevation style part first when
12058
+ * the style lacks it.
12059
+ *
12060
+ * @param config - Without it the hillshade is hidden, and the surface stays as the map draws it.
12061
+ *
12062
+ * @remarks
12063
+ * **Instances:** one per map — a second `get()` returns the same instance, with the given config
12064
+ * applied to it.
12065
+ *
12066
+ * @throws Error if the elevation source cannot be added to the style.
12067
+ */
12068
+ static get(map: TomTomMap, config?: TerrainModuleConfig): Promise<TerrainModule>;
12069
+ private constructor();
12070
+ /**
12071
+ * @ignore
12072
+ */
12073
+ protected _initSourcesWithLayers(): {
12074
+ hillshade: StyleSourceWithLayers<import("maplibre-gl").SourceSpecification, import("maplibre-gl").Source>;
12075
+ };
12076
+ /**
12077
+ * @ignore
12078
+ */
12079
+ protected _applyConfig(config: TerrainModuleConfig | undefined): TerrainModuleConfig | undefined;
12080
+ /**
12081
+ * Shows or hides the hillshade shading.
12082
+ */
12083
+ setHillshadeVisible(visible: boolean): void;
12084
+ /**
12085
+ * Whether the hillshade shading is shown.
12086
+ */
12087
+ isHillshadeVisible(): boolean;
12088
+ /**
12089
+ * Raises the map surface in 3D, or flattens it, keeping the configured exaggeration.
12090
+ */
12091
+ setElevationEnabled(enabled: boolean): void;
12092
+ /**
12093
+ * Whether the map surface is raised in 3D.
12094
+ */
12095
+ isElevationEnabled(): boolean;
12096
+ /**
12097
+ * Sets the vertical {@link TerrainModuleConfig.elevationExaggeration | exaggeration} of the 3D
12098
+ * surface, kept for when elevation is enabled later.
12099
+ */
12100
+ setElevationExaggeration(elevationExaggeration: number): void;
12101
+ /**
12102
+ * Lifecycle events of this module. The hillshade is a raster layer with no features to
12103
+ * interact with, so there are no user interaction events; `config-change` fires after every
12104
+ * change.
12105
+ *
12106
+ * @example
12107
+ * ```typescript
12108
+ * const unsubscribe = terrain.events.on('config-change', (config) => console.log(config));
12109
+ * ```
12110
+ */
12111
+ get events(): ModuleEvents<TerrainModuleConfig>;
12112
+ private showHillshade;
12113
+ private showElevation;
12114
+ private storeConfig;
12115
+ }
12116
+ //#endregion
11509
12117
  //#region src/traffic/types/trafficAreaAnalyticsConfig.d.ts
11510
12118
  /**
11511
12119
  * A single stop in an analytics color ramp.
@@ -11783,6 +12391,17 @@ type AreaAnalyticsRegionPolygonConfig = {
11783
12391
  */
11784
12392
  inverted?: boolean;
11785
12393
  };
12394
+ /**
12395
+ * The green / amber / red every metric's default colour stops and the `trafficLight` colour theme
12396
+ * are drawn from.
12397
+ *
12398
+ * @ignore
12399
+ */
12400
+ declare const TRAFFIC_LIGHT_COLORS: {
12401
+ readonly good: "#2dc653";
12402
+ readonly moderate: "#f5a623";
12403
+ readonly bad: "#e03030";
12404
+ };
11786
12405
  /**
11787
12406
  * Default values for all {@link TrafficAreaAnalyticsConfig} options.
11788
12407
  *
@@ -11803,10 +12422,16 @@ declare const AREA_ANALYTICS_DEFAULTS: {
11803
12422
  congestionLevel: {
11804
12423
  color: {
11805
12424
  valueType: "raw";
11806
- stops: {
12425
+ stops: ({
11807
12426
  value: number;
11808
- color: string;
11809
- }[];
12427
+ color: "#2dc653";
12428
+ } | {
12429
+ value: number;
12430
+ color: "#f5a623";
12431
+ } | {
12432
+ value: number;
12433
+ color: "#e03030";
12434
+ })[];
11810
12435
  };
11811
12436
  height: {
11812
12437
  maxHeightMeters: number;
@@ -11817,10 +12442,16 @@ declare const AREA_ANALYTICS_DEFAULTS: {
11817
12442
  speed: {
11818
12443
  color: {
11819
12444
  valueType: "relativeToPredefinedRangePCT";
11820
- stops: {
12445
+ stops: ({
12446
+ value: number;
12447
+ color: "#e03030";
12448
+ } | {
11821
12449
  value: number;
11822
- color: string;
11823
- }[];
12450
+ color: "#f5a623";
12451
+ } | {
12452
+ value: number;
12453
+ color: "#2dc653";
12454
+ })[];
11824
12455
  };
11825
12456
  height: {
11826
12457
  maxHeightMeters: number;
@@ -11831,10 +12462,16 @@ declare const AREA_ANALYTICS_DEFAULTS: {
11831
12462
  travelTime: {
11832
12463
  color: {
11833
12464
  valueType: "relativeToPredefinedRangePCT";
11834
- stops: {
12465
+ stops: ({
12466
+ value: number;
12467
+ color: "#2dc653";
12468
+ } | {
12469
+ value: number;
12470
+ color: "#f5a623";
12471
+ } | {
11835
12472
  value: number;
11836
- color: string;
11837
- }[];
12473
+ color: "#e03030";
12474
+ })[];
11838
12475
  };
11839
12476
  height: {
11840
12477
  maxHeightMeters: number;
@@ -11845,10 +12482,16 @@ declare const AREA_ANALYTICS_DEFAULTS: {
11845
12482
  freeFlowSpeed: {
11846
12483
  color: {
11847
12484
  valueType: "relativeToPredefinedRangePCT";
11848
- stops: {
12485
+ stops: ({
11849
12486
  value: number;
11850
- color: string;
11851
- }[];
12487
+ color: "#e03030";
12488
+ } | {
12489
+ value: number;
12490
+ color: "#f5a623";
12491
+ } | {
12492
+ value: number;
12493
+ color: "#2dc653";
12494
+ })[];
11852
12495
  };
11853
12496
  height: {
11854
12497
  maxHeightMeters: number;
@@ -11859,10 +12502,16 @@ declare const AREA_ANALYTICS_DEFAULTS: {
11859
12502
  networkLength: {
11860
12503
  color: {
11861
12504
  valueType: "relativeToActualRangePCT";
11862
- stops: {
12505
+ stops: ({
12506
+ value: number;
12507
+ color: "#2dc653";
12508
+ } | {
11863
12509
  value: number;
11864
- color: string;
11865
- }[];
12510
+ color: "#f5a623";
12511
+ } | {
12512
+ value: number;
12513
+ color: "#e03030";
12514
+ })[];
11866
12515
  };
11867
12516
  height: {
11868
12517
  maxHeightMeters: number;
@@ -12077,6 +12726,7 @@ export declare class TrafficAreaAnalyticsModule extends AbstractDataOwnedMapModu
12077
12726
  protected _initSourcesWithLayers(config?: TrafficAreaAnalyticsConfig, _restore?: boolean): AreaAnalyticsSourcesWithLayers;
12078
12727
  /** @ignore */
12079
12728
  protected _applyConfig(config: TrafficAreaAnalyticsConfig | undefined): TrafficAreaAnalyticsConfig | undefined;
12729
+ private moveLayersToSpecPositions;
12080
12730
  /** @ignore */
12081
12731
  protected discardShownData(): void;
12082
12732
  /** @ignore */
@@ -13584,6 +14234,20 @@ export declare class TrafficIncidentsModule extends AbstractStyleOwnedMapModule<
13584
14234
  get events(): CombinedEvents<TrafficIncidentsModuleFeature, IncidentsConfig, never>;
13585
14235
  }
13586
14236
  //#endregion
14237
+ //#region src/utils/colorUtils.d.ts
14238
+ /**
14239
+ * Red, green, blue and alpha of a colour, each 0–1.
14240
+ * @ignore
14241
+ */
14242
+ type RGBAColor = [number, number, number, number];
14243
+ /**
14244
+ * Parses any CSS colour a map style writes — `#rgb`, `#rrggbb(aa)`, `rgb()`/`rgba()` in numbers or
14245
+ * percentages, `hsl()`/`hsla()`, `transparent` and the named colours — or `undefined` for a string
14246
+ * that is not one.
14247
+ * @ignore
14248
+ */
14249
+ export declare const parseCssColor: (cssColor: string) => RGBAColor | undefined;
14250
+ //#endregion
13587
14251
  //#region src/utils/types/paddedBounds.d.ts
13588
14252
  /**
13589
14253
  * Options for calculating map center.
@@ -13664,4 +14328,4 @@ export declare const calculatePaddedCenter: (options: CalculateMapCenterOptions)
13664
14328
  */
13665
14329
  export declare const calculateFittingBBox: (options: CalculateFittingBBoxOptions) => BBox | null;
13666
14330
  //#endregion
13667
- 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, CustomImage, DefaultPlaceIconConfig, DisplayRouteProps, DisplayRouteRelatedProps, DisplayRouteSummaries, DisplayRouteSummary, DisplayRouteSummaryProps, DrawnSectionType, EVAvailabilityConfig, EventHandlerConfig, EventHandlerCursorConfig, EventType, FilterShowMode, FilterablePOICategory, GeneratedSectionType, GeoJSONSourcesWithLayers, HasAdditionalLayersConfig, HasBeforeID, HillshadeModuleConfig, HoverEventType, IncidentFocusStyle, LayerSpecFilter, LayerSpecTemplate, LayerSpecWithSource, LightDark, MapEventsConfig, MapFont, MapModuleCommonConfig, MapStyleLayerID, POIsModuleConfig, POIsModuleFeature, PlaceConnectionDisplay, PlaceConnectionLayerName, PlaceConnectionsConfig, PlaceConnectionsLayersConfig, PlaceIconConfig, PlaceLayerName, PlaceLayersConfig, PlaceTextConfig, PlacesModuleConfig, PlacesTheme, PlanningWaypoint, PutEventStateOptions, RouteLayersConfig, RouteStateProps, RouteTheme, RouteWaypointSize, RouteWidth, RoutingModuleConfig, SVGIconStyleOptions, SectionDisplayConfig, SectionDrawStyle, SectionIconConfig, SectionKnobName, SectionKnobOf, SectionLineLayerName, SectionLinePattern, SectionSignConfig, SectionSignLayerName, SectionSignPriority, SectionSignUnit, SectionSourceKey, SectionSymbolLayerName, SectionsDisplayConfig, SourceWithLayerIDs, SourceWithLayers, SourcesWithLayers, StyleSourcesWithLayers, StylingCatalogue, StylingKnobAppliesTo, StylingKnobDescriptor, StylingKnobId, StylingKnobKind, StylingKnobRange, StylingKnobValue, StylingKnobValueOf, StylingSettings, SupportsEvents, SymbolLayerSpecWithoutSource, ToBeAddedLayerSpec, ToBeAddedLayerSpecTemplate, ToBeAddedLayerSpecWithoutSource, TrafficAreaAnalyticsConfig, TrafficIncidentOverlayConfig, UserEventHandler, ValuesFilter, WaypointsConfig };
14331
+ 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, HoverEventType, IncidentFocusStyle, LayerQuery, 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, TerrainModuleConfig, ToBeAddedLayerSpec, ToBeAddedLayerSpecTemplate, ToBeAddedLayerSpecWithoutSource, TrafficAreaAnalyticsConfig, TrafficIncidentOverlayConfig, UserEventHandler, ValuesFilter, WaypointsConfig };