@tomtom-org/maps-sdk 0.59.0 → 0.60.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.
- package/CHANGELOG.md +27 -0
- package/core/dist/core.es.js +1 -1
- package/map/dist/index.d.ts +232 -201
- package/map/dist/map.es.js +1 -1
- package/map/dist/map.es.js.map +1 -1
- package/package.json +1 -1
- package/services/dist/index.d.ts +2 -0
package/map/dist/index.d.ts
CHANGED
|
@@ -2645,12 +2645,13 @@ export declare class TomTomMap {
|
|
|
2645
2645
|
* ```typescript
|
|
2646
2646
|
* // Routes appear below labels but above the base map
|
|
2647
2647
|
* const routingModule = await RoutingModule.create(map);
|
|
2648
|
-
* // Uses mapStyleLayerIDs.lowestLabel by default
|
|
2648
|
+
* // Uses mapStyleLayerIDs.lowestLabel by default; `beforeLayerConfig` moves the route lines
|
|
2649
|
+
* const underRoads = await RoutingModule.create(map, { beforeLayerConfig: { mainLines: 'lowestRoadLine' } });
|
|
2649
2650
|
* ```
|
|
2650
2651
|
*
|
|
2651
2652
|
* **GeometriesModule** - Configurable layer positioning for polygon areas:
|
|
2652
2653
|
* ```typescript
|
|
2653
|
-
* // Default: below
|
|
2654
|
+
* // Default: on top of the map, below the geometry titles
|
|
2654
2655
|
* const geometriesModule = await GeometriesModule.create(map);
|
|
2655
2656
|
*
|
|
2656
2657
|
* // Custom: below buildings to show at ground level
|
|
@@ -2686,10 +2687,10 @@ export declare class TomTomMap {
|
|
|
2686
2687
|
* - If a reference layer doesn't exist, a module repositioning its layers puts them on top of the
|
|
2687
2688
|
* style instead. A layer added with a `beforeID` that never appears is reported through
|
|
2688
2689
|
* `console.error` and skipped, since a missing anchor there is usually a typo.
|
|
2689
|
-
* -
|
|
2690
|
+
* - RoutingModule draws its lines below `lowestLabel` by default; GeometriesModule adds its layers on top
|
|
2690
2691
|
*
|
|
2691
2692
|
* @see {@link GeometryBeforeLayerConfig} for GeometriesModule layer positioning options
|
|
2692
|
-
* @see {@link
|
|
2693
|
+
* @see {@link RoutingBeforeLayerConfig} for RoutingModule layer positioning options
|
|
2693
2694
|
*
|
|
2694
2695
|
* @group Map Style
|
|
2695
2696
|
*/
|
|
@@ -3268,6 +3269,27 @@ type MapStyleLayerID = keyof typeof mapStyleLayerIDs;
|
|
|
3268
3269
|
* @group Shared
|
|
3269
3270
|
*/
|
|
3270
3271
|
type BeforeLayerConfig = 'top' | MapStyleLayerID;
|
|
3272
|
+
/**
|
|
3273
|
+
* Where a module's layers go in the map's layer stack: one {@link BeforeLayerConfig} for the whole
|
|
3274
|
+
* module, or one per part of it.
|
|
3275
|
+
*
|
|
3276
|
+
* @remarks
|
|
3277
|
+
* In the record form a part takes its own entry, else `all`. A part neither names stays where the
|
|
3278
|
+
* module puts it by default, and a part's own layers keep their order wherever it goes.
|
|
3279
|
+
*
|
|
3280
|
+
* @typeParam PART - The names of the module's parts that move independently.
|
|
3281
|
+
*
|
|
3282
|
+
* @example
|
|
3283
|
+
* ```typescript
|
|
3284
|
+
* const everything: GeometryBeforeLayerConfig = 'top';
|
|
3285
|
+
* const split: GeometryBeforeLayerConfig = { all: 'lowestLabel', fill: 'lowestRoadLine' };
|
|
3286
|
+
* ```
|
|
3287
|
+
*
|
|
3288
|
+
* @group Shared
|
|
3289
|
+
*/
|
|
3290
|
+
type PartsBeforeLayerConfig<PART extends string> = BeforeLayerConfig | ({
|
|
3291
|
+
all?: BeforeLayerConfig;
|
|
3292
|
+
} & { [P in PART]?: BeforeLayerConfig; });
|
|
3271
3293
|
/**
|
|
3272
3294
|
* Configuration for adding custom layers to a map module based on its controlled source data.
|
|
3273
3295
|
*
|
|
@@ -5250,7 +5272,7 @@ export declare abstract class AbstractMapModule<SOURCES_WITH_LAYERS extends Sour
|
|
|
5250
5272
|
* accordingly. The configuration persists across map style changes, ensuring consistent
|
|
5251
5273
|
* module behavior even when the map's base style is modified.
|
|
5252
5274
|
*
|
|
5253
|
-
*
|
|
5275
|
+
* The given configuration **replaces** the current one
|
|
5254
5276
|
* rather than being merged into it. To change one part of it, use {@link updateConfig}.
|
|
5255
5277
|
*
|
|
5256
5278
|
* @example
|
|
@@ -5278,8 +5300,8 @@ export declare abstract class AbstractMapModule<SOURCES_WITH_LAYERS extends Sour
|
|
|
5278
5300
|
*
|
|
5279
5301
|
* @example
|
|
5280
5302
|
* ```typescript
|
|
5281
|
-
* routing.applyConfig({ displayUnits: 'imperial',
|
|
5282
|
-
* routing.updateConfig({
|
|
5303
|
+
* routing.applyConfig({ displayUnits: 'imperial', color: '#0a3653' });
|
|
5304
|
+
* routing.updateConfig({ color: '#c2185b' }); // displayUnits stays imperial
|
|
5283
5305
|
* ```
|
|
5284
5306
|
*
|
|
5285
5307
|
* @see {@link applyConfig} to apply a whole configuration
|
|
@@ -6432,8 +6454,7 @@ export declare const geometryFillStyles: readonly ["filled", "outline", "inverte
|
|
|
6432
6454
|
//#endregion
|
|
6433
6455
|
//#region src/geometry/types/geometriesModuleConfig.d.ts
|
|
6434
6456
|
/**
|
|
6435
|
-
* Fill configuration for geometry styling — the interior color
|
|
6436
|
-
* fill layer sits in the map's layer stack.
|
|
6457
|
+
* Fill configuration for geometry styling — the interior color and opacity.
|
|
6437
6458
|
*
|
|
6438
6459
|
* @example
|
|
6439
6460
|
* ```typescript
|
|
@@ -6469,15 +6490,6 @@ export type GeometryFillConfig = {
|
|
|
6469
6490
|
* @default 0.15
|
|
6470
6491
|
*/
|
|
6471
6492
|
opacity?: DataDrivenPropertyValueSpecification<number>;
|
|
6472
|
-
/**
|
|
6473
|
-
* Layer positioning for the **fill** layer only.
|
|
6474
|
-
*
|
|
6475
|
-
* @remarks
|
|
6476
|
-
* Overrides the top-level {@link GeometriesModuleConfig.beforeLayerConfig} for the fill.
|
|
6477
|
-
* Use this to sink the fill below the road network while the border stays above, e.g.
|
|
6478
|
-
* `fill: { beforeLayerConfig: 'lowestRoadLine' }`, `line: { beforeLayerConfig: 'top' }`.
|
|
6479
|
-
*/
|
|
6480
|
-
beforeLayerConfig?: BeforeLayerConfig;
|
|
6481
6493
|
};
|
|
6482
6494
|
/**
|
|
6483
6495
|
* The label drawn at the center of each geometry: its text, and how it looks.
|
|
@@ -6593,15 +6605,6 @@ export type GeometryLineConfig = {
|
|
|
6593
6605
|
* ```
|
|
6594
6606
|
*/
|
|
6595
6607
|
layer?: Partial<ToBeAddedLayerSpecTemplate<LineLayerSpecification>>;
|
|
6596
|
-
/**
|
|
6597
|
-
* Layer positioning for the **border/outline** layer only.
|
|
6598
|
-
*
|
|
6599
|
-
* @remarks
|
|
6600
|
-
* Overrides the top-level {@link GeometriesModuleConfig.beforeLayerConfig} for the border.
|
|
6601
|
-
* Pair with {@link GeometryFillConfig.beforeLayerConfig} to split the fill and border across
|
|
6602
|
-
* the layer stack (e.g. fill below roads, border on top).
|
|
6603
|
-
*/
|
|
6604
|
-
beforeLayerConfig?: BeforeLayerConfig;
|
|
6605
6608
|
};
|
|
6606
6609
|
/**
|
|
6607
6610
|
* Labels placed along the polygon border lines, repeating the geometry's title.
|
|
@@ -6661,13 +6664,13 @@ export type GeometryLineLabel = LabelConfig & {
|
|
|
6661
6664
|
* Controls where geometry layers are placed in the map's layer stack.
|
|
6662
6665
|
*
|
|
6663
6666
|
* @remarks
|
|
6664
|
-
* Use this to ensure geometries appear above or below other map features like
|
|
6665
|
-
* labels, roads, or other data layers.
|
|
6666
|
-
*
|
|
6667
|
-
* @remarks
|
|
6668
6667
|
* A single {@link BeforeLayerConfig} (`'top'` or a layer id) positions **all** geometry layers
|
|
6669
|
-
* together. The
|
|
6670
|
-
*
|
|
6668
|
+
* together. The record form positions the parts independently, `all` covering any it doesn't name:
|
|
6669
|
+
* - `fill` — the fill layer.
|
|
6670
|
+
* - `line` — the border/outline, with its line labels.
|
|
6671
|
+
*
|
|
6672
|
+
* A part the config names no target for sits where the module adds it, just below the geometry
|
|
6673
|
+
* titles; `'top'` keeps those titles above the geometries themselves.
|
|
6671
6674
|
*
|
|
6672
6675
|
* @example
|
|
6673
6676
|
* ```typescript
|
|
@@ -6683,24 +6686,7 @@ export type GeometryLineLabel = LabelConfig & {
|
|
|
6683
6686
|
*
|
|
6684
6687
|
* @group Geometries
|
|
6685
6688
|
*/
|
|
6686
|
-
export type GeometryBeforeLayerConfig =
|
|
6687
|
-
/**
|
|
6688
|
-
* Per-layer positioning targets for the object form of {@link GeometryBeforeLayerConfig}.
|
|
6689
|
-
*
|
|
6690
|
-
* `fill` and `line` position their respective layers; `all` is the fallback applied to any
|
|
6691
|
-
* target not explicitly set. A per-layer `beforeLayerConfig` inside {@link GeometryFillConfig}
|
|
6692
|
-
* or {@link GeometryLineConfig} wins over the value here.
|
|
6693
|
-
*
|
|
6694
|
-
* @group Geometries
|
|
6695
|
-
*/
|
|
6696
|
-
export type GeometryBeforeLayerTargets = {
|
|
6697
|
-
/** Fallback position for any layer not named by `fill` / `line`. */
|
|
6698
|
-
all?: BeforeLayerConfig;
|
|
6699
|
-
/** Position for the fill layer. */
|
|
6700
|
-
fill?: BeforeLayerConfig;
|
|
6701
|
-
/** Position for the border/outline layer (and its line labels). */
|
|
6702
|
-
line?: BeforeLayerConfig;
|
|
6703
|
-
};
|
|
6689
|
+
export type GeometryBeforeLayerConfig = PartsBeforeLayerConfig<'fill' | 'line'>;
|
|
6704
6690
|
/**
|
|
6705
6691
|
* Configuration options for the GeometriesModule.
|
|
6706
6692
|
*
|
|
@@ -6771,7 +6757,7 @@ export type GeometriesModuleConfig = MapModuleCommonConfig & {
|
|
|
6771
6757
|
*/
|
|
6772
6758
|
visible?: boolean;
|
|
6773
6759
|
/**
|
|
6774
|
-
* Fill color
|
|
6760
|
+
* Fill color and opacity.
|
|
6775
6761
|
*
|
|
6776
6762
|
* Controls the interior color and transparency of polygon geometries.
|
|
6777
6763
|
*/
|
|
@@ -6781,7 +6767,7 @@ export type GeometriesModuleConfig = MapModuleCommonConfig & {
|
|
|
6781
6767
|
*/
|
|
6782
6768
|
label?: GeometryLabel;
|
|
6783
6769
|
/**
|
|
6784
|
-
* Border/outline configuration
|
|
6770
|
+
* Border/outline configuration.
|
|
6785
6771
|
*
|
|
6786
6772
|
* Controls the outline appearance of polygon geometries.
|
|
6787
6773
|
*/
|
|
@@ -6789,9 +6775,8 @@ export type GeometriesModuleConfig = MapModuleCommonConfig & {
|
|
|
6789
6775
|
/**
|
|
6790
6776
|
* Layer positioning configuration.
|
|
6791
6777
|
*
|
|
6792
|
-
* Controls where geometry layers appear in the map's layer stack
|
|
6793
|
-
*
|
|
6794
|
-
* below that layer.
|
|
6778
|
+
* Controls where geometry layers appear in the map's layer stack: `'top'` places them above all
|
|
6779
|
+
* layers, a layer ID below that layer, and a `{ all, fill, line }` record each part on its own.
|
|
6795
6780
|
*
|
|
6796
6781
|
* @example
|
|
6797
6782
|
* ```typescript
|
|
@@ -6801,8 +6786,8 @@ export type GeometriesModuleConfig = MapModuleCommonConfig & {
|
|
|
6801
6786
|
* // Below map labels
|
|
6802
6787
|
* beforeLayerConfig: 'lowestLabel'
|
|
6803
6788
|
*
|
|
6804
|
-
* //
|
|
6805
|
-
* beforeLayerConfig: '
|
|
6789
|
+
* // Fill below the road network, border below labels
|
|
6790
|
+
* beforeLayerConfig: { fill: 'lowestRoadLine', line: 'lowestLabel' }
|
|
6806
6791
|
* ```
|
|
6807
6792
|
*/
|
|
6808
6793
|
beforeLayerConfig?: GeometryBeforeLayerConfig;
|
|
@@ -7000,8 +6985,8 @@ export declare class GeometriesModule extends AbstractDataOwnedMapModule<Geometr
|
|
|
7000
6985
|
* @remarks
|
|
7001
6986
|
* **Configuration Options:**
|
|
7002
6987
|
* - `color`: Base colour for fill and border
|
|
7003
|
-
* - `fill`: Fill color
|
|
7004
|
-
* - `line`: Border/outline styling
|
|
6988
|
+
* - `fill`: Fill color and opacity
|
|
6989
|
+
* - `line`: Border/outline styling
|
|
7005
6990
|
* - `label`: Center label text and styling
|
|
7006
6991
|
* - `beforeLayerConfig`: Layer ordering — a single target, or `{ all, fill, line }` to split them
|
|
7007
6992
|
*
|
|
@@ -7067,30 +7052,20 @@ export declare class GeometriesModule extends AbstractDataOwnedMapModule<Geometr
|
|
|
7067
7052
|
*/
|
|
7068
7053
|
protected _applyConfig(config: GeometriesModuleConfig | undefined): GeometriesModuleConfig | undefined;
|
|
7069
7054
|
private applyVisibility;
|
|
7070
|
-
|
|
7071
|
-
private resolveBeforeID;
|
|
7072
|
-
private moveLayersBefore;
|
|
7073
|
-
private get fillLayerIDs();
|
|
7074
|
-
private get lineLayerIDs();
|
|
7055
|
+
private get partLayerIDs();
|
|
7075
7056
|
/**
|
|
7076
7057
|
* Positions the geometry layers relative to other map layers.
|
|
7077
7058
|
*
|
|
7078
7059
|
* @param layerConfig - Layer positioning. A single {@link BeforeLayerConfig} (`'top'` or a layer
|
|
7079
|
-
* id) moves all geometry layers together; the
|
|
7080
|
-
* fill and border independently.
|
|
7060
|
+
* id) moves all geometry layers together; the record form (`{ all?, fill?, line? }`) positions the
|
|
7061
|
+
* fill and border independently, leaving a part it names no target for where it is.
|
|
7081
7062
|
*
|
|
7082
|
-
*
|
|
7083
|
-
* A per-layer `beforeLayerConfig` set inside the `fill` / `line` config sections takes precedence
|
|
7084
|
-
* over the value passed here.
|
|
7085
|
-
*
|
|
7086
|
-
* **Available Layer IDs:** predefined ids from `mapStyleLayerIDs`, or a custom layer id.
|
|
7063
|
+
* **Available Layer IDs:** the keys of `mapStyleLayerIDs`.
|
|
7087
7064
|
*
|
|
7088
7065
|
* @example
|
|
7089
7066
|
* ```typescript
|
|
7090
|
-
* import { mapStyleLayerIDs } from '@tomtom-org/maps-sdk/map';
|
|
7091
|
-
*
|
|
7092
7067
|
* // Place all geometry layers below labels
|
|
7093
|
-
* geometries.moveBeforeLayer(
|
|
7068
|
+
* geometries.moveBeforeLayer('lowestLabel');
|
|
7094
7069
|
*
|
|
7095
7070
|
* // Fill below the road network, border on top
|
|
7096
7071
|
* geometries.moveBeforeLayer({ fill: 'lowestRoadLine', line: 'top' });
|
|
@@ -9798,7 +9773,7 @@ type SectionLinePattern = 'solid' | 'dashed' | 'dotted';
|
|
|
9798
9773
|
* One of the uniform knobs {@link SectionDisplayConfig} offers.
|
|
9799
9774
|
* @group Routing
|
|
9800
9775
|
*/
|
|
9801
|
-
type SectionKnobName = 'visible' | 'color' | 'opacity' | 'width' | 'style' | 'pattern' | 'icon' | 'sign';
|
|
9776
|
+
type SectionKnobName = 'visible' | 'color' | 'opacity' | 'width' | 'widthFactor' | 'style' | 'pattern' | 'icon' | 'sign';
|
|
9802
9777
|
/**
|
|
9803
9778
|
* The key one section type's source, events scope and `getShown()` entry are filed under.
|
|
9804
9779
|
*
|
|
@@ -9823,42 +9798,42 @@ declare const SECTION_REGISTRY: {
|
|
|
9823
9798
|
readonly visible: false;
|
|
9824
9799
|
readonly style: "halo";
|
|
9825
9800
|
readonly pattern: "solid";
|
|
9826
|
-
readonly knobs: readonly ["visible", "color", "opacity", "width", "style", "pattern", "icon"];
|
|
9801
|
+
readonly knobs: readonly ["visible", "color", "opacity", "width", "widthFactor", "style", "pattern", "icon"];
|
|
9827
9802
|
};
|
|
9828
9803
|
readonly carTrain: {
|
|
9829
9804
|
readonly sourceKey: "carTrainSections";
|
|
9830
9805
|
readonly visible: true;
|
|
9831
9806
|
readonly style: "halo";
|
|
9832
9807
|
readonly pattern: "dashed";
|
|
9833
|
-
readonly knobs: readonly ["visible", "color", "opacity", "width", "style", "pattern", "icon"];
|
|
9808
|
+
readonly knobs: readonly ["visible", "color", "opacity", "width", "widthFactor", "style", "pattern", "icon"];
|
|
9834
9809
|
};
|
|
9835
9810
|
readonly importantRoadStretch: {
|
|
9836
9811
|
readonly sourceKey: "importantRoadStretchSections";
|
|
9837
9812
|
readonly visible: false;
|
|
9838
9813
|
readonly style: "halo";
|
|
9839
9814
|
readonly pattern: "solid";
|
|
9840
|
-
readonly knobs: readonly ["visible", "color", "opacity", "width", "style", "pattern", "icon"];
|
|
9815
|
+
readonly knobs: readonly ["visible", "color", "opacity", "width", "widthFactor", "style", "pattern", "icon"];
|
|
9841
9816
|
};
|
|
9842
9817
|
readonly lowEmissionZone: {
|
|
9843
9818
|
readonly sourceKey: "lowEmissionZoneSections";
|
|
9844
9819
|
readonly visible: true;
|
|
9845
9820
|
readonly style: "halo";
|
|
9846
9821
|
readonly pattern: "solid";
|
|
9847
|
-
readonly knobs: readonly ["visible", "color", "opacity", "width", "style", "pattern", "icon"];
|
|
9822
|
+
readonly knobs: readonly ["visible", "color", "opacity", "width", "widthFactor", "style", "pattern", "icon"];
|
|
9848
9823
|
};
|
|
9849
9824
|
readonly motorway: {
|
|
9850
9825
|
readonly sourceKey: "motorwaySections";
|
|
9851
9826
|
readonly visible: false;
|
|
9852
9827
|
readonly style: "halo";
|
|
9853
9828
|
readonly pattern: "solid";
|
|
9854
|
-
readonly knobs: readonly ["visible", "color", "opacity", "width", "style", "pattern", "icon"];
|
|
9829
|
+
readonly knobs: readonly ["visible", "color", "opacity", "width", "widthFactor", "style", "pattern", "icon"];
|
|
9855
9830
|
};
|
|
9856
9831
|
readonly pedestrian: {
|
|
9857
9832
|
readonly sourceKey: "pedestrianSections";
|
|
9858
9833
|
readonly visible: false;
|
|
9859
9834
|
readonly style: "halo";
|
|
9860
9835
|
readonly pattern: "dashed";
|
|
9861
|
-
readonly knobs: readonly ["visible", "color", "opacity", "width", "style", "pattern", "icon"];
|
|
9836
|
+
readonly knobs: readonly ["visible", "color", "opacity", "width", "widthFactor", "style", "pattern", "icon"];
|
|
9862
9837
|
};
|
|
9863
9838
|
readonly speedLimit: {
|
|
9864
9839
|
readonly sourceKey: "speedLimitSections";
|
|
@@ -9870,56 +9845,56 @@ declare const SECTION_REGISTRY: {
|
|
|
9870
9845
|
readonly visible: true;
|
|
9871
9846
|
readonly style: "halo";
|
|
9872
9847
|
readonly pattern: "dashed";
|
|
9873
|
-
readonly knobs: readonly ["visible", "color", "opacity", "width", "style", "pattern", "icon"];
|
|
9848
|
+
readonly knobs: readonly ["visible", "color", "opacity", "width", "widthFactor", "style", "pattern", "icon"];
|
|
9874
9849
|
};
|
|
9875
9850
|
readonly unpaved: {
|
|
9876
9851
|
readonly sourceKey: "unpavedSections";
|
|
9877
9852
|
readonly visible: false;
|
|
9878
9853
|
readonly style: "halo";
|
|
9879
9854
|
readonly pattern: "dashed";
|
|
9880
|
-
readonly knobs: readonly ["visible", "color", "opacity", "width", "style", "pattern", "icon"];
|
|
9855
|
+
readonly knobs: readonly ["visible", "color", "opacity", "width", "widthFactor", "style", "pattern", "icon"];
|
|
9881
9856
|
};
|
|
9882
9857
|
readonly urban: {
|
|
9883
9858
|
readonly sourceKey: "urbanSections";
|
|
9884
9859
|
readonly visible: false;
|
|
9885
9860
|
readonly style: "halo";
|
|
9886
9861
|
readonly pattern: "solid";
|
|
9887
|
-
readonly knobs: readonly ["visible", "color", "opacity", "width", "style", "pattern", "icon"];
|
|
9862
|
+
readonly knobs: readonly ["visible", "color", "opacity", "width", "widthFactor", "style", "pattern", "icon"];
|
|
9888
9863
|
};
|
|
9889
9864
|
readonly ferry: {
|
|
9890
9865
|
readonly sourceKey: "ferries";
|
|
9891
9866
|
readonly visible: true;
|
|
9892
9867
|
readonly style: "inline";
|
|
9893
9868
|
readonly pattern: "solid";
|
|
9894
|
-
readonly knobs: readonly ["visible", "color", "opacity", "width", "style", "pattern", "icon"];
|
|
9869
|
+
readonly knobs: readonly ["visible", "color", "opacity", "width", "widthFactor", "style", "pattern", "icon"];
|
|
9895
9870
|
};
|
|
9896
9871
|
readonly tollRoad: {
|
|
9897
9872
|
readonly sourceKey: "tollRoads";
|
|
9898
9873
|
readonly visible: true;
|
|
9899
9874
|
readonly style: "halo";
|
|
9900
9875
|
readonly pattern: "solid";
|
|
9901
|
-
readonly knobs: readonly ["visible", "color", "opacity", "width", "style", "pattern", "icon"];
|
|
9876
|
+
readonly knobs: readonly ["visible", "color", "opacity", "width", "widthFactor", "style", "pattern", "icon"];
|
|
9902
9877
|
};
|
|
9903
9878
|
readonly traffic: {
|
|
9904
9879
|
readonly sourceKey: "incidents";
|
|
9905
9880
|
readonly visible: true;
|
|
9906
9881
|
readonly style: "inline";
|
|
9907
9882
|
readonly pattern: "solid";
|
|
9908
|
-
readonly knobs: readonly ["visible", "opacity", "width", "style"];
|
|
9883
|
+
readonly knobs: readonly ["visible", "opacity", "width", "widthFactor", "style"];
|
|
9909
9884
|
};
|
|
9910
9885
|
readonly tunnel: {
|
|
9911
9886
|
readonly sourceKey: "tunnels";
|
|
9912
9887
|
readonly visible: true;
|
|
9913
9888
|
readonly style: "inline";
|
|
9914
9889
|
readonly pattern: "solid";
|
|
9915
|
-
readonly knobs: readonly ["visible", "color", "opacity", "width", "style", "pattern", "icon"];
|
|
9890
|
+
readonly knobs: readonly ["visible", "color", "opacity", "width", "widthFactor", "style", "pattern", "icon"];
|
|
9916
9891
|
};
|
|
9917
9892
|
readonly vehicleRestricted: {
|
|
9918
9893
|
readonly sourceKey: "vehicleRestricted";
|
|
9919
9894
|
readonly visible: true;
|
|
9920
9895
|
readonly style: "inline";
|
|
9921
9896
|
readonly pattern: "dotted";
|
|
9922
|
-
readonly knobs: readonly ["visible", "color", "opacity", "width", "style", "pattern", "icon"];
|
|
9897
|
+
readonly knobs: readonly ["visible", "color", "opacity", "width", "widthFactor", "style", "pattern", "icon"];
|
|
9923
9898
|
};
|
|
9924
9899
|
};
|
|
9925
9900
|
/**
|
|
@@ -10479,7 +10454,9 @@ type WaypointsConfig = {
|
|
|
10479
10454
|
* Route line thickness preset.
|
|
10480
10455
|
*
|
|
10481
10456
|
* @remarks
|
|
10482
|
-
* Controls the thickness of the
|
|
10457
|
+
* Controls the thickness of the route line, its outline, the section lines and the instruction
|
|
10458
|
+
* lines at all zoom levels. Each preset is a zoom profile of its own, tuned so the outline stays a
|
|
10459
|
+
* readable rim at every thickness; a `widthFactor` multiplies whichever preset applies.
|
|
10483
10460
|
*
|
|
10484
10461
|
* Available options:
|
|
10485
10462
|
* - `"s"` - Thin line, suitable for dense or cluttered maps
|
|
@@ -10493,7 +10470,8 @@ type RouteWidth = 's' | 'm' | 'l';
|
|
|
10493
10470
|
* Route waypoint icon size preset.
|
|
10494
10471
|
*
|
|
10495
10472
|
* @remarks
|
|
10496
|
-
* Controls the scale of waypoint pin icons at all zoom levels.
|
|
10473
|
+
* Controls the scale of waypoint pin icons at all zoom levels: `"s"` is 0.75 × `"m"` and `"l"` is
|
|
10474
|
+
* 1.25 × `"m"`. {@link RoutingModuleConfig.waypointSizeFactor} multiplies whichever preset applies.
|
|
10497
10475
|
*
|
|
10498
10476
|
* Available options:
|
|
10499
10477
|
* - `"s"` - Small icons
|
|
@@ -10503,51 +10481,6 @@ type RouteWidth = 's' | 'm' | 'l';
|
|
|
10503
10481
|
* @group Routing
|
|
10504
10482
|
*/
|
|
10505
10483
|
type RouteWaypointSize = 's' | 'm' | 'l';
|
|
10506
|
-
/**
|
|
10507
|
-
* Generic styling for route visualization.
|
|
10508
|
-
*
|
|
10509
|
-
* @remarks
|
|
10510
|
-
* * Provides high-level theming options for route appearance.
|
|
10511
|
-
* * Can be overwritten by more specific layer styling configurations.
|
|
10512
|
-
*
|
|
10513
|
-
* @group Routing
|
|
10514
|
-
*/
|
|
10515
|
-
type RouteTheme = {
|
|
10516
|
-
/**
|
|
10517
|
-
* The primary color applied to the route line, outline, and waypoint icons.
|
|
10518
|
-
*
|
|
10519
|
-
* @remarks
|
|
10520
|
-
* Affects the main selected route line foreground, the route outline (a darker shade
|
|
10521
|
-
* is derived automatically), and the waypoint icon fill.
|
|
10522
|
-
* Can be overwritten by more specific layer styling configurations.
|
|
10523
|
-
*
|
|
10524
|
-
* When unset, the map's accent colour applies if a theme sets one ({@link TomTomMap.mapColors}).
|
|
10525
|
-
*
|
|
10526
|
-
* Available options:
|
|
10527
|
-
* - Any valid CSS color string (e.g., `"#FF0000"`, `"rgb(255,0,0)"`, `"red"`, etc.)
|
|
10528
|
-
*/
|
|
10529
|
-
mainColor?: string;
|
|
10530
|
-
/**
|
|
10531
|
-
* Line thickness preset for the main route line and its outline.
|
|
10532
|
-
*
|
|
10533
|
-
* @remarks
|
|
10534
|
-
* Scales the route line width at all zoom levels using predefined profiles.
|
|
10535
|
-
* Can be overwritten by more specific layer styling configurations.
|
|
10536
|
-
*
|
|
10537
|
-
* @defaultValue `"m"`
|
|
10538
|
-
*/
|
|
10539
|
-
routeWidth?: RouteWidth;
|
|
10540
|
-
/**
|
|
10541
|
-
* Icon size preset for route waypoint pins.
|
|
10542
|
-
*
|
|
10543
|
-
* @remarks
|
|
10544
|
-
* Scales the waypoint icon at all zoom levels using predefined profiles.
|
|
10545
|
-
* Can be overwritten by more specific layer styling configurations.
|
|
10546
|
-
*
|
|
10547
|
-
* @defaultValue `"m"`
|
|
10548
|
-
*/
|
|
10549
|
-
waypointSize?: RouteWaypointSize;
|
|
10550
|
-
};
|
|
10551
10484
|
/**
|
|
10552
10485
|
* The icon drawn on a route section.
|
|
10553
10486
|
*
|
|
@@ -10574,11 +10507,12 @@ type SectionIconConfig = {
|
|
|
10574
10507
|
*/
|
|
10575
10508
|
placement?: 'center' | 'along';
|
|
10576
10509
|
/**
|
|
10577
|
-
* Icon scale, where `1` is the sprite image's own size.
|
|
10510
|
+
* Icon scale, where `1` is the sprite image's own size. Clamped to
|
|
10511
|
+
* {@link SECTION_ICON_SIZE_FACTOR_RANGE}, 0.25 to 2.
|
|
10578
10512
|
*
|
|
10579
10513
|
* @defaultValue `1` on the generated types; the bespoke types that draw an icon keep their own zoom-ramped size.
|
|
10580
10514
|
*/
|
|
10581
|
-
|
|
10515
|
+
sizeFactor?: number;
|
|
10582
10516
|
};
|
|
10583
10517
|
type SectionKnobs = {
|
|
10584
10518
|
/**
|
|
@@ -10607,6 +10541,11 @@ type SectionKnobs = {
|
|
|
10607
10541
|
* Line width preset. Defaults to the route's own width.
|
|
10608
10542
|
*/
|
|
10609
10543
|
width?: RouteWidth;
|
|
10544
|
+
/**
|
|
10545
|
+
* Multiplier over the section's {@link width} preset; the two compose. Defaults to the route's
|
|
10546
|
+
* own `widthFactor`, and is clamped to {@link ROUTE_WIDTH_FACTOR_RANGE}, 0.5 to 2.
|
|
10547
|
+
*/
|
|
10548
|
+
widthFactor?: number;
|
|
10610
10549
|
/**
|
|
10611
10550
|
* Whether the section bands the route (`halo`) or stands in for the route line along its own
|
|
10612
10551
|
* stretch (`inline`). This decides both where the section's line sits in the layer order and
|
|
@@ -10712,6 +10651,10 @@ type SectionSignConfig = {
|
|
|
10712
10651
|
/**
|
|
10713
10652
|
* What a sign gives way to when another symbol wants the same spot.
|
|
10714
10653
|
*
|
|
10654
|
+
* @remarks
|
|
10655
|
+
* Where the route icons sit is {@link RoutingModuleConfig.beforeLayerConfig}'s to say; this
|
|
10656
|
+
* places the signs relative to them and to the map's labels.
|
|
10657
|
+
*
|
|
10715
10658
|
* @defaultValue follows {@link placement}: `'belowRouteIcons'` under `atChange`, where the sign
|
|
10716
10659
|
* is the only one posting that change; `'belowMapLabels'` under `along`, where the next repeat
|
|
10717
10660
|
* posts it again.
|
|
@@ -10827,6 +10770,35 @@ type SectionDisplayConfig<T extends DrawnSectionType = DrawnSectionType> = Pick<
|
|
|
10827
10770
|
* @group Routing
|
|
10828
10771
|
*/
|
|
10829
10772
|
type SectionsDisplayConfig = { [T in DrawnSectionType]?: SectionDisplayConfig<T>; };
|
|
10773
|
+
/**
|
|
10774
|
+
* Where the route's layers sit in the map's layer stack: one target for the whole route, or one per
|
|
10775
|
+
* part of it.
|
|
10776
|
+
*
|
|
10777
|
+
* @remarks
|
|
10778
|
+
* The parts, and where each sits by default:
|
|
10779
|
+
* - `mainLines` — the route lines, with every section line (the bands drawn under the route line
|
|
10780
|
+
* and the stretches drawn over it). Below the map's labels.
|
|
10781
|
+
* - `instructionLines` — the guidance lines and their arrows. Below the map's labels, above the
|
|
10782
|
+
* route lines.
|
|
10783
|
+
* - `icons` — every icon the route draws: waypoints, summary bubbles, charging stops, border
|
|
10784
|
+
* crossings and section icons. Most sit above the map's labels; section icons drawn on generated
|
|
10785
|
+
* section types and the tunnel sign sit below them. A target puts them all beneath it, those two lowest.
|
|
10786
|
+
*
|
|
10787
|
+
* Each part keeps its own layers' order wherever it goes. Section signs are not a part: their
|
|
10788
|
+
* {@link SectionSignConfig.priority} settles which symbols they give way to, among the route icons
|
|
10789
|
+
* and the map labels wherever this put them.
|
|
10790
|
+
*
|
|
10791
|
+
* @example
|
|
10792
|
+
* ```typescript
|
|
10793
|
+
* // The whole route on top of the map
|
|
10794
|
+
* const everything: RoutingBeforeLayerConfig = 'top';
|
|
10795
|
+
* // Route lines under the road network, icons where they are
|
|
10796
|
+
* const lines: RoutingBeforeLayerConfig = { mainLines: 'lowestRoadLine' };
|
|
10797
|
+
* ```
|
|
10798
|
+
*
|
|
10799
|
+
* @group Routing
|
|
10800
|
+
*/
|
|
10801
|
+
type RoutingBeforeLayerConfig = PartsBeforeLayerConfig<'mainLines' | 'instructionLines' | 'icons'>;
|
|
10830
10802
|
/**
|
|
10831
10803
|
* Configuration options for the routing module.
|
|
10832
10804
|
*
|
|
@@ -10852,14 +10824,47 @@ type RoutingModuleConfig = MapModuleCommonConfig & {
|
|
|
10852
10824
|
*/
|
|
10853
10825
|
displayUnits?: DisplayUnits;
|
|
10854
10826
|
/**
|
|
10855
|
-
*
|
|
10827
|
+
* The colour of the route line, its outline and the waypoint icons, as any CSS colour string.
|
|
10828
|
+
*
|
|
10829
|
+
* @remarks
|
|
10830
|
+
* The outline takes a darker shade of it. When unset, the map's accent colour applies if a
|
|
10831
|
+
* theme sets one ({@link TomTomMap.mapColors}), else the SDK's own route blue. `layers` overrides
|
|
10832
|
+
* it layer by layer.
|
|
10833
|
+
*/
|
|
10834
|
+
color?: string;
|
|
10835
|
+
/**
|
|
10836
|
+
* Thickness preset of the route line and its outline, which the section and instruction lines
|
|
10837
|
+
* follow.
|
|
10838
|
+
*
|
|
10839
|
+
* @defaultValue `"m"`
|
|
10840
|
+
*/
|
|
10841
|
+
width?: RouteWidth;
|
|
10842
|
+
/**
|
|
10843
|
+
* Multiplier over the {@link width} preset, `1` leaving it unchanged; the two compose, so
|
|
10844
|
+
* `{ width: 'l', widthFactor: 1.5 }` draws 1.5 × the `"l"` profile.
|
|
10845
|
+
*
|
|
10846
|
+
* @remarks
|
|
10847
|
+
* Clamped to {@link ROUTE_WIDTH_FACTOR_RANGE}, 0.5 to 2. Sections without a `widthFactor` of
|
|
10848
|
+
* their own follow it.
|
|
10849
|
+
*
|
|
10850
|
+
* @defaultValue `1`
|
|
10851
|
+
*/
|
|
10852
|
+
widthFactor?: number;
|
|
10853
|
+
/**
|
|
10854
|
+
* Size preset of the waypoint pins.
|
|
10855
|
+
*
|
|
10856
|
+
* @defaultValue `"m"`
|
|
10857
|
+
*/
|
|
10858
|
+
waypointSize?: RouteWaypointSize;
|
|
10859
|
+
/**
|
|
10860
|
+
* Multiplier over the {@link waypointSize} preset, `1` leaving it unchanged; the two compose.
|
|
10856
10861
|
*
|
|
10857
10862
|
* @remarks
|
|
10858
|
-
*
|
|
10859
|
-
*
|
|
10860
|
-
*
|
|
10863
|
+
* Clamped to {@link ROUTE_WAYPOINT_SIZE_FACTOR_RANGE}, 0.5 to 2.
|
|
10864
|
+
*
|
|
10865
|
+
* @defaultValue `1`
|
|
10861
10866
|
*/
|
|
10862
|
-
|
|
10867
|
+
waypointSizeFactor?: number;
|
|
10863
10868
|
/**
|
|
10864
10869
|
* Configuration for the waypoints source and layers to display them on the map.
|
|
10865
10870
|
*
|
|
@@ -10913,6 +10918,13 @@ type RoutingModuleConfig = MapModuleCommonConfig & {
|
|
|
10913
10918
|
* knobs cannot express.
|
|
10914
10919
|
*/
|
|
10915
10920
|
sections?: SectionsDisplayConfig;
|
|
10921
|
+
/**
|
|
10922
|
+
* Where the route's layers sit in the map's layer stack, for the whole route or per part.
|
|
10923
|
+
*
|
|
10924
|
+
* @remarks
|
|
10925
|
+
* Left out, every layer sits where {@link RoutingBeforeLayerConfig} says it does by default.
|
|
10926
|
+
*/
|
|
10927
|
+
beforeLayerConfig?: RoutingBeforeLayerConfig;
|
|
10916
10928
|
/**
|
|
10917
10929
|
* Custom layer styling configuration.
|
|
10918
10930
|
*
|
|
@@ -10933,9 +10945,11 @@ type RoutingModuleConfig = MapModuleCommonConfig & {
|
|
|
10933
10945
|
* @param layerIDPrefix - Optional prefix to add to layer IDs for supporting multiple instances.
|
|
10934
10946
|
* @param instanceIndex - Optional instance index for image ID suffixes.
|
|
10935
10947
|
* @param lightDark - The map style's light/dark theme, which the country crossing plaque colours follow.
|
|
10948
|
+
* @param existingLayerID - The anchor a configured `beforeLayerConfig` target resolves to, given the
|
|
10949
|
+
* layer it names: that layer when the style has it, else undefined for the top of the stack.
|
|
10936
10950
|
* @ignore
|
|
10937
10951
|
*/
|
|
10938
|
-
export declare const buildRoutingLayers: (config?: RoutingModuleConfig, layerIDPrefix?: string, instanceIndex?: number, lightDark?: LightDark) => Required<RouteLayersConfig>;
|
|
10952
|
+
export declare const buildRoutingLayers: (config?: RoutingModuleConfig, layerIDPrefix?: string, instanceIndex?: number, lightDark?: LightDark, existingLayerID?: (layerID: string | undefined) => string | undefined) => Required<RouteLayersConfig>;
|
|
10939
10953
|
/**
|
|
10940
10954
|
* Default routing layers configuration. Calls routingLayers with no parameters.
|
|
10941
10955
|
*
|
|
@@ -11017,39 +11031,72 @@ export declare const DESELECTED_ROUTE_FILTER: ExpressionSpecification;
|
|
|
11017
11031
|
*/
|
|
11018
11032
|
export declare const ROUTE_LINE_OUTLINE_WIDTH: ExpressionSpecification;
|
|
11019
11033
|
/**
|
|
11020
|
-
*
|
|
11034
|
+
* The values {@link RoutingModuleConfig.widthFactor} and a section's `widthFactor` are clamped to.
|
|
11035
|
+
*
|
|
11036
|
+
* @remarks
|
|
11037
|
+
* 0.5 of the thin preset is the thinnest that still draws a line inside its outline, 1 px within
|
|
11038
|
+
* 2 px at the lowest zoom; 2 of the thick one is a 30 px line at street zooms, about a motorway's
|
|
11039
|
+
* width. Beyond either end the route stops reading as a line over the roads it follows.
|
|
11040
|
+
* @group Routing
|
|
11041
|
+
*/
|
|
11042
|
+
export declare const ROUTE_WIDTH_FACTOR_RANGE: KnobRange;
|
|
11043
|
+
/**
|
|
11044
|
+
* The values {@link RoutingModuleConfig.waypointSizeFactor} is clamped to.
|
|
11045
|
+
*
|
|
11046
|
+
* @remarks
|
|
11047
|
+
* Spans a pin from about 14 px wide, half the small preset zoomed out, to 120 px, twice the large
|
|
11048
|
+
* one zoomed in.
|
|
11049
|
+
* @group Routing
|
|
11050
|
+
*/
|
|
11051
|
+
export declare const ROUTE_WAYPOINT_SIZE_FACTOR_RANGE: KnobRange;
|
|
11052
|
+
/**
|
|
11053
|
+
* The values {@link SectionIconConfig.sizeFactor} is clamped to.
|
|
11054
|
+
*
|
|
11055
|
+
* @remarks
|
|
11056
|
+
* Relative to the sprite image, which the built-in section icons already draw at 0.5 to 1 of: down
|
|
11057
|
+
* to half that, and up to twice the image.
|
|
11058
|
+
* @group Routing
|
|
11059
|
+
*/
|
|
11060
|
+
export declare const SECTION_ICON_SIZE_FACTOR_RANGE: KnobRange;
|
|
11061
|
+
/**
|
|
11062
|
+
* How thick a route line is drawn: a preset and a multiplier over it.
|
|
11063
|
+
* @ignore
|
|
11064
|
+
*/
|
|
11065
|
+
export type RouteLineWidth = Pick<RoutingModuleConfig, 'width' | 'widthFactor'>;
|
|
11066
|
+
/**
|
|
11067
|
+
* Returns the foreground line width expression for the given width.
|
|
11021
11068
|
* @ignore
|
|
11022
11069
|
*/
|
|
11023
|
-
export declare const getLineForegroundWidth: (
|
|
11070
|
+
export declare const getLineForegroundWidth: (lineWidth?: RouteLineWidth) => ExpressionSpecification;
|
|
11024
11071
|
/**
|
|
11025
|
-
* Returns the outline line width expression for the given
|
|
11072
|
+
* Returns the outline line width expression for the given width.
|
|
11026
11073
|
* @ignore
|
|
11027
11074
|
*/
|
|
11028
|
-
export declare const getLineOutlineWidth: (
|
|
11075
|
+
export declare const getLineOutlineWidth: (lineWidth?: RouteLineWidth) => ExpressionSpecification;
|
|
11029
11076
|
/**
|
|
11030
|
-
* Returns the waypoint icon size expression for the given size preset.
|
|
11077
|
+
* Returns the waypoint icon size expression for the given size preset and multiplier.
|
|
11031
11078
|
* @ignore
|
|
11032
11079
|
*/
|
|
11033
|
-
export declare const getWaypointIconSize: (size?: RouteWaypointSize) => ExpressionSpecification;
|
|
11080
|
+
export declare const getWaypointIconSize: (size?: RouteWaypointSize, sizeFactor?: number) => ExpressionSpecification;
|
|
11034
11081
|
/**
|
|
11035
|
-
* Returns the width expression of a section halo for the given
|
|
11082
|
+
* Returns the width expression of a section halo for the given width.
|
|
11036
11083
|
*
|
|
11037
11084
|
* @remarks
|
|
11038
11085
|
* Wider than {@link getLineOutlineWidth} at every zoom, which is what makes a section drawn
|
|
11039
11086
|
* beneath the route show as a band around it rather than disappear under the route's own outline.
|
|
11040
11087
|
* @ignore
|
|
11041
11088
|
*/
|
|
11042
|
-
export declare const getSectionHaloWidth: (
|
|
11089
|
+
export declare const getSectionHaloWidth: (lineWidth?: RouteLineWidth) => ExpressionSpecification;
|
|
11043
11090
|
/**
|
|
11044
|
-
* Returns the instruction line width expression for the given
|
|
11091
|
+
* Returns the instruction line width expression for the given width.
|
|
11045
11092
|
* @ignore
|
|
11046
11093
|
*/
|
|
11047
|
-
export declare const getInstructionLineWidth: (
|
|
11094
|
+
export declare const getInstructionLineWidth: (lineWidth?: RouteLineWidth) => ExpressionSpecification;
|
|
11048
11095
|
/**
|
|
11049
|
-
* Returns the instruction outline width expression for the given
|
|
11096
|
+
* Returns the instruction outline width expression for the given width.
|
|
11050
11097
|
* @ignore
|
|
11051
11098
|
*/
|
|
11052
|
-
export declare const getInstructionOutlineWidth: (
|
|
11099
|
+
export declare const getInstructionOutlineWidth: (lineWidth?: RouteLineWidth) => ExpressionSpecification;
|
|
11053
11100
|
/**
|
|
11054
11101
|
* @ignore
|
|
11055
11102
|
*/
|
|
@@ -11944,7 +11991,7 @@ export type RoutingEvents = CombinedEvents<MapGeoJSONFeature, RoutingModuleConfi
|
|
|
11944
11991
|
export declare class RoutingModule extends AbstractDataOwnedMapModule<RoutingSourcesWithLayers, RoutingModuleConfig> {
|
|
11945
11992
|
private layersSpecs;
|
|
11946
11993
|
private layerIDPrefix;
|
|
11947
|
-
private
|
|
11994
|
+
private appliedRouteColor?;
|
|
11948
11995
|
private readonly shownFeaturesHandlers;
|
|
11949
11996
|
/**
|
|
11950
11997
|
* Make sure the map is ready before create an instance of the module and any other interaction with the map
|
|
@@ -11985,7 +12032,7 @@ export declare class RoutingModule extends AbstractDataOwnedMapModule<RoutingSou
|
|
|
11985
12032
|
*/
|
|
11986
12033
|
static create(tomtomMap: TomTomMap, config?: RoutingModuleConfig): Promise<RoutingModule>;
|
|
11987
12034
|
private constructor();
|
|
11988
|
-
private
|
|
12035
|
+
private routeColorOf;
|
|
11989
12036
|
private buildLayersSpecs;
|
|
11990
12037
|
private createSourcesWithLayers;
|
|
11991
12038
|
/**
|
|
@@ -12069,7 +12116,8 @@ export declare class RoutingModule extends AbstractDataOwnedMapModule<RoutingSou
|
|
|
12069
12116
|
* `aboveRouteIcons` anchors to nothing, which puts the layer on top. The other two differ only
|
|
12070
12117
|
* in where the search starts: under the base map's labels for `belowMapLabels`, and at them for
|
|
12071
12118
|
* `belowRouteIcons`, since a section's own icon layer is pinned below the labels and a sign
|
|
12072
|
-
* sent under that would give way to every place name on the way.
|
|
12119
|
+
* sent under that would give way to every place name on the way. The arrows drawn along the
|
|
12120
|
+
* lines are not icons, even when `beforeLayerConfig` lifts the lines above the labels.
|
|
12073
12121
|
*/
|
|
12074
12122
|
private signAnchorLayerID;
|
|
12075
12123
|
/** @ignore */
|
|
@@ -12285,11 +12333,12 @@ export declare class RoutingModule extends AbstractDataOwnedMapModule<RoutingSou
|
|
|
12285
12333
|
*/
|
|
12286
12334
|
get events(): RoutingEvents;
|
|
12287
12335
|
/**
|
|
12288
|
-
* Returns the map style layer under which route lines are rendered
|
|
12336
|
+
* Returns the map style layer under which route lines are rendered, or undefined when they are
|
|
12337
|
+
* on top of the stack.
|
|
12289
12338
|
* * Useful if you want to render extra layers just above the route ones but not on top of everything else.
|
|
12290
|
-
* *
|
|
12339
|
+
* * Follows `beforeLayerConfig`, and might differ depending on the loaded style/version.
|
|
12291
12340
|
*/
|
|
12292
|
-
getLayerToRenderLinesUnder(): string;
|
|
12341
|
+
getLayerToRenderLinesUnder(): string | undefined;
|
|
12293
12342
|
}
|
|
12294
12343
|
//#endregion
|
|
12295
12344
|
//#region src/terrain/types/terrainModuleConfig.d.ts
|
|
@@ -12624,47 +12673,29 @@ type AreaAnalyticsMetricConfig = {
|
|
|
12624
12673
|
filters?: AreaAnalyticsMetricFilter;
|
|
12625
12674
|
};
|
|
12626
12675
|
/**
|
|
12627
|
-
*
|
|
12676
|
+
* Where the area analytics layers sit in the map's layer stack.
|
|
12628
12677
|
*
|
|
12629
|
-
*
|
|
12630
|
-
*
|
|
12631
|
-
*
|
|
12678
|
+
* @remarks
|
|
12679
|
+
* A single {@link BeforeLayerConfig} positions every display mode's layer; the record form positions
|
|
12680
|
+
* them independently, keyed by {@link AreaAnalyticsDisplayMode}, `all` covering any it doesn't name.
|
|
12681
|
+
* A mode neither names keeps its default: `'lowestLabel'` for `heatmap`, `hexgrid-2d` and
|
|
12682
|
+
* `square-2d`, `'lowestPlaceLabel'` for `hexgrid-3d` and `square-3d`. The region boundary always
|
|
12683
|
+
* sits below the map's labels.
|
|
12632
12684
|
*
|
|
12633
12685
|
* @example
|
|
12634
12686
|
* ```typescript
|
|
12635
|
-
* //
|
|
12636
|
-
* const config: TrafficAreaAnalyticsModuleConfig = {
|
|
12637
|
-
* beforeLayerConfig: {
|
|
12638
|
-
* heatmap: 'lowestLabel',
|
|
12639
|
-
* hexgrid: { flat2D: 'lowestLabel', extrusion3D: 'lowestPlaceLabel' },
|
|
12640
|
-
* square: { flat2D: 'lowestLabel', extrusion3D: 'lowestPlaceLabel' },
|
|
12641
|
-
* },
|
|
12642
|
-
* };
|
|
12687
|
+
* // Every mode on top of the map
|
|
12688
|
+
* const config: TrafficAreaAnalyticsModuleConfig = { beforeLayerConfig: 'top' };
|
|
12643
12689
|
*
|
|
12644
|
-
* //
|
|
12690
|
+
* // Flat modes below labels, extrusions below place labels
|
|
12645
12691
|
* const config: TrafficAreaAnalyticsModuleConfig = {
|
|
12646
|
-
* beforeLayerConfig: {
|
|
12692
|
+
* beforeLayerConfig: { all: 'lowestLabel', 'hexgrid-3d': 'lowestPlaceLabel', 'square-3d': 'lowestPlaceLabel' },
|
|
12647
12693
|
* };
|
|
12648
12694
|
* ```
|
|
12649
12695
|
*
|
|
12650
12696
|
* @group Traffic Area Analytics
|
|
12651
12697
|
*/
|
|
12652
|
-
type AreaAnalyticsBeforeLayerConfig =
|
|
12653
|
-
/** Layer position for the heatmap layer. Defaults to `'lowestLabel'`. */
|
|
12654
|
-
heatmap?: BeforeLayerConfig;
|
|
12655
|
-
hexgrid?: {
|
|
12656
|
-
/** Layer position for the flat hexgrid fill layer. Defaults to `'lowestLabel'`. */
|
|
12657
|
-
flat2D?: BeforeLayerConfig;
|
|
12658
|
-
/** Layer position for the extruded hexgrid layer. Defaults to `'lowestPlaceLabel'`. */
|
|
12659
|
-
extrusion3D?: BeforeLayerConfig;
|
|
12660
|
-
};
|
|
12661
|
-
square?: {
|
|
12662
|
-
/** Layer position for the flat square fill layer. Defaults to `'lowestLabel'`. */
|
|
12663
|
-
flat2D?: BeforeLayerConfig;
|
|
12664
|
-
/** Layer position for the extruded square layer. Defaults to `'lowestPlaceLabel'`. */
|
|
12665
|
-
extrusion3D?: BeforeLayerConfig;
|
|
12666
|
-
};
|
|
12667
|
-
};
|
|
12698
|
+
type AreaAnalyticsBeforeLayerConfig = PartsBeforeLayerConfig<AreaAnalyticsDisplayMode>;
|
|
12668
12699
|
/**
|
|
12669
12700
|
* Display configuration for the actual region boundary geometry.
|
|
12670
12701
|
*
|
|
@@ -12917,8 +12948,7 @@ type TrafficAreaAnalyticsModuleConfig = MapModuleCommonConfig & {
|
|
|
12917
12948
|
*/
|
|
12918
12949
|
metricConfig?: Partial<Record<AreaAnalyticsMetricKey, AreaAnalyticsMetricConfig>>;
|
|
12919
12950
|
/**
|
|
12920
|
-
*
|
|
12921
|
-
* Omitted layer types fall back to their default positions (`'lowestLabel'` for flat/heatmap, `'lowestPlaceLabel'` for extrusions).
|
|
12951
|
+
* Where the analytics layers sit in the map's layer stack, for all display modes or per mode.
|
|
12922
12952
|
*/
|
|
12923
12953
|
beforeLayerConfig?: AreaAnalyticsBeforeLayerConfig;
|
|
12924
12954
|
/**
|
|
@@ -13050,6 +13080,7 @@ export declare class TrafficAreaAnalyticsModule extends AbstractDataOwnedMapModu
|
|
|
13050
13080
|
protected _initSourcesWithLayers(config?: TrafficAreaAnalyticsModuleConfig, _restore?: boolean): AreaAnalyticsSourcesWithLayers;
|
|
13051
13081
|
/** @ignore */
|
|
13052
13082
|
protected _applyConfig(config: TrafficAreaAnalyticsModuleConfig | undefined): TrafficAreaAnalyticsModuleConfig | undefined;
|
|
13083
|
+
private get modeLayerSpecs();
|
|
13053
13084
|
private moveLayersToSpecPositions;
|
|
13054
13085
|
/** @ignore */
|
|
13055
13086
|
protected discardShownData(): void;
|
|
@@ -13183,11 +13214,11 @@ export declare class TrafficAreaAnalyticsModule extends AbstractDataOwnedMapModu
|
|
|
13183
13214
|
square: FeatureCollection<Polygon, AreaAnalyticsDisplayProperties>;
|
|
13184
13215
|
};
|
|
13185
13216
|
/**
|
|
13186
|
-
* Repositions analytics layers
|
|
13217
|
+
* Repositions the analytics layers, all together or per display mode.
|
|
13187
13218
|
*
|
|
13188
|
-
* Only the
|
|
13219
|
+
* Only the display modes `layerConfig` names a target for are repositioned; the others are left in place.
|
|
13189
13220
|
*
|
|
13190
|
-
* @param layerConfig -
|
|
13221
|
+
* @param layerConfig - A single target for every mode, or one per {@link AreaAnalyticsDisplayMode}.
|
|
13191
13222
|
*/
|
|
13192
13223
|
moveBeforeLayer(layerConfig: AreaAnalyticsBeforeLayerConfig): void;
|
|
13193
13224
|
/**
|
|
@@ -13804,8 +13835,8 @@ export type TrafficIncidentOverlayModuleConfig = MapModuleCommonConfig & {
|
|
|
13804
13835
|
* Position incident layers before this map-style layer. Pass `'top'` to
|
|
13805
13836
|
* pin them above every other layer. Defaults to `'lowestLabel'`, which
|
|
13806
13837
|
* keeps incidents below map labels (roads, places, POIs) so labels stay
|
|
13807
|
-
* readable — the same default the routing
|
|
13808
|
-
*
|
|
13838
|
+
* readable — the same default the routing module and the flat area
|
|
13839
|
+
* analytics layers use.
|
|
13809
13840
|
*/
|
|
13810
13841
|
beforeLayerConfig?: BeforeLayerConfig;
|
|
13811
13842
|
/**
|
|
@@ -14656,4 +14687,4 @@ export declare const calculatePaddedCenter: (options: CalculateMapCenterOptions)
|
|
|
14656
14687
|
*/
|
|
14657
14688
|
export declare const calculateFittingBBox: (options: CalculateFittingBBoxOptions) => BBox | null;
|
|
14658
14689
|
//#endregion
|
|
14659
|
-
export type { AREA_ANALYTICS_DEFAULTS, AreaAnalyticsBeforeLayerConfig, AreaAnalyticsColorStop, AreaAnalyticsColorStopsConfig, AreaAnalyticsColorTheme, AreaAnalyticsDisplayMode, AreaAnalyticsHeightConfig, AreaAnalyticsMetricConfig, AreaAnalyticsMetricFilter, AreaAnalyticsRegionPolygonConfig, AreaAnalyticsValueType, AvailabilityLevel, BaseMapColorName, BeforeLayerConfig, BespokeSectionType, ByIdOrIndex, CSSCursor, ChargingSpeedIconMapping, ChargingStopIconConfig, ChargingStopIconMapping, ChargingStopTextConfig, ChargingStopsConfig, CleanEventStateOptions, CleanEventStatesOptions, ClickEventType, CountryCrossingAlignment, CountryCrossingConfig, CountryCrossingFeature, CustomImage, DefaultPlaceIconConfig, DisplayCountryCrossing, DisplayCountryCrossingProps, DisplayCountryCrossings, DisplayRouteProps, DisplayRouteRelatedProps, DisplayRouteSummaries, DisplayRouteSummary, DisplayRouteSummaryProps, DrawnSectionType, EVAvailabilityConfig, EventHandlerConfig, EventHandlerCursorConfig, EventHandlerHoverConfig, EventState, EventType, ExtraFeatureProp, FeaturePropValue, FilterablePOICategory, GeneratedSectionType, GeoJSONSourcesWithLayers, HasAdditionalLayersConfig, HasBeforeID, HoverEventType, HslColor, LabelConfig, LayerQuery, LayerSpecFilter, LayerSpecTemplate, LayerSpecWithSource, LightDark, MapColorName, MapColors, MapEventsConfig, MapFont, MapModuleCommonConfig, MapStyleLayerID, POIsModuleConfig, POIsModuleFeature, PlaceClusterBadgeConfig, PlaceConnectionDisplay, PlaceConnectionLayerName, PlaceConnectionsConfig, PlaceConnectionsLayersConfig, PlaceEntryPointFeature, PlaceEntryPointProps, PlaceEntryPointsConfig, PlaceEntryPointsLayersConfig, PlaceEntryPointsShowFor, PlaceIconConfig, PlaceLayerName, PlaceLayersConfig, PlaceTextConfig, PlacesClusterConfig, PlacesModuleConfig, PlacesTheme, PlanningWaypoint, PutEventStateOptions, RGBAColor, RouteLayersConfig, RouteStateProps,
|
|
14690
|
+
export type { AREA_ANALYTICS_DEFAULTS, AreaAnalyticsBeforeLayerConfig, AreaAnalyticsColorStop, AreaAnalyticsColorStopsConfig, AreaAnalyticsColorTheme, AreaAnalyticsDisplayMode, AreaAnalyticsHeightConfig, AreaAnalyticsMetricConfig, AreaAnalyticsMetricFilter, AreaAnalyticsRegionPolygonConfig, AreaAnalyticsValueType, AvailabilityLevel, BaseMapColorName, BeforeLayerConfig, BespokeSectionType, ByIdOrIndex, CSSCursor, ChargingSpeedIconMapping, ChargingStopIconConfig, ChargingStopIconMapping, ChargingStopTextConfig, ChargingStopsConfig, CleanEventStateOptions, CleanEventStatesOptions, ClickEventType, CountryCrossingAlignment, CountryCrossingConfig, CountryCrossingFeature, CustomImage, DefaultPlaceIconConfig, DisplayCountryCrossing, DisplayCountryCrossingProps, DisplayCountryCrossings, DisplayRouteProps, DisplayRouteRelatedProps, DisplayRouteSummaries, DisplayRouteSummary, DisplayRouteSummaryProps, DrawnSectionType, EVAvailabilityConfig, EventHandlerConfig, EventHandlerCursorConfig, EventHandlerHoverConfig, EventState, EventType, ExtraFeatureProp, FeaturePropValue, FilterablePOICategory, GeneratedSectionType, GeoJSONSourcesWithLayers, HasAdditionalLayersConfig, HasBeforeID, HoverEventType, HslColor, LabelConfig, LayerQuery, LayerSpecFilter, LayerSpecTemplate, LayerSpecWithSource, LightDark, MapColorName, MapColors, MapEventsConfig, MapFont, MapModuleCommonConfig, MapStyleLayerID, POIsModuleConfig, POIsModuleFeature, PartsBeforeLayerConfig, PlaceClusterBadgeConfig, PlaceConnectionDisplay, PlaceConnectionLayerName, PlaceConnectionsConfig, PlaceConnectionsLayersConfig, PlaceEntryPointFeature, PlaceEntryPointProps, PlaceEntryPointsConfig, PlaceEntryPointsLayersConfig, PlaceEntryPointsShowFor, PlaceIconConfig, PlaceLayerName, PlaceLayersConfig, PlaceTextConfig, PlacesClusterConfig, PlacesModuleConfig, PlacesTheme, PlanningWaypoint, PutEventStateOptions, RGBAColor, RouteLayersConfig, RouteStateProps, RouteWaypointSize, RouteWidth, RoutingBeforeLayerConfig, RoutingModuleConfig, SVGIconStyleOptions, SectionDisplayConfig, SectionDrawStyle, SectionIconConfig, SectionKnobName, SectionKnobOf, SectionLineLayerName, SectionLinePattern, SectionSignConfig, SectionSignLayerName, SectionSignPlacement, SectionSignPriority, SectionSignUnit, SectionSourceKey, SectionSymbolLayerName, SectionsDisplayConfig, SourceWithLayerIDs, SourceWithLayers, SourcesWithLayers, StyleSourcesWithLayers, StylingColorKnobId, StylingKnob, StylingKnobAppliesTo, StylingKnobId, StylingKnobKind, StylingKnobRange, StylingKnobValue, StylingKnobValueOf, StylingPreset, StylingPresetId, StylingSettings, SupportsEvents, SymbolLayerSpecWithoutSource, TRAFFIC_LIGHT_COLORS, TerrainModuleConfig, ToBeAddedLayerSpec, ToBeAddedLayerSpecTemplate, ToBeAddedLayerSpecWithoutSource, TrafficAreaAnalyticsModuleConfig, UserEventHandler, WaypointsConfig };
|