OptionalactiveMetric?: AreaAnalyticsMetricKeyThe metric that drives color and extrusion height.
OptionalbeforeLayerConfig?: AreaAnalyticsBeforeLayerConfigPer-layer-type positioning — controls where each analytics layer type sits in the map layer stack.
Omitted layer types fall back to their default positions ('lowestLabel' for flat/heatmap, 'lowestPlaceLabel' for extrusions).
OptionaldisplayMode?: AreaAnalyticsDisplayModeVisualization mode.
OptionalmetricConfig?: Partial<Record<AreaAnalyticsMetricKey, AreaAnalyticsMetricConfig>>Per-metric visualization configuration (color, height, filters).
Metrics not listed here fall back to defaults (congestion color theme, metric-dependent height scale).
OptionalregionPolygon?: AreaAnalyticsRegionPolygonConfigDisplay options for the region polygon boundary drawn alongside the analytics data.
Optionalvisible?: booleanControls the visibility of the area analytics layers.
The active metric is set via activeMetric (defaults to 'congestionLevel').
Per-metric style settings (color, height, filters) are nested under metricConfig keyed by
AreaAnalyticsMetricKey, making it easy to pre-configure multiple metrics independently and switch
between them at runtime via setMetric().
const config: TrafficAreaAnalyticsConfig = {
displayMode: 'hexgrid-3d',
activeMetric: 'congestionLevel',
metricConfig: {
congestionLevel: {
color: 'heat',
height: { maxHeightMeters: 80, scaleMode: 'predefinedRange' },
filters: { min: 10 },
},
speed: {
color: {
valueType: 'raw',
stops: [
{ value: 0, color: '#e03030' },
{ value: 60, color: '#f5a623' },
{ value: 120, color: '#2dc653' },
],
},
},
},
};
Configuration for the Traffic Area Analytics visualization module.