OptionalbeforeLayerConfig?: GeometryBeforeLayerConfigLayer positioning configuration.
Controls where geometry layers appear in the map's layer stack.
Use 'top' to place above all layers, or specify a layer ID to place
below that layer.
OptionalcolorConfig?: GeometryColorConfigFill color and opacity configuration.
Controls the interior color and transparency of polygon geometries.
OptionallineConfig?: GeometryLineConfigBorder/outline configuration.
Controls the outline appearance of polygon geometries.
OptionallineLabelConfig?: GeometryLineLabelConfigLine label configuration.
When set, labels are placed along the polygon border lines.
OptionaltextConfig?: GeometryTextConfigText label configuration.
Controls labels displayed at geometry center points.
Optionaltheme?: GeometryThemeVisual theme applied to all features shown by this module.
'filled' — Colored fill with thin border (default)'outline' — Transparent fill with thick colored border'inverted' — Colors the area outside the polygon (donut geometry)Individual features can override this by setting theme in their properties.
OptionaltransformFeaturesForDisplay?: (input: PolygonFeatures) => PolygonFeaturesTransform applied to features before rendering.
Receives the value passed to GeometriesModule.show and returns features ready for display. Useful for deriving labels or other display properties from domain data.
Used internally by reachableRangeGeometryConfig to generate budget
labels (e.g. '30 min') from feature properties. For most use cases,
the standard config fields (colorConfig, textConfig, theme) suffice.
// Basic styling
const config: GeometriesModuleConfig = {
colorConfig: {
fillColor: '#FF5733',
fillOpacity: 0.3
},
lineConfig: {
lineColor: '#C70039',
lineWidth: 2
}
};
// With labels and positioning
const advancedConfig: GeometriesModuleConfig = {
colorConfig: {
fillColor: 'blue',
fillOpacity: 0.25
},
lineConfig: {
lineColor: 'darkblue',
lineWidth: 3
},
textConfig: {
textField: ['get', 'name']
},
beforeLayerConfig: 'lowestLabel' // Below map labels
};
// Data-driven styling
const dynamicConfig: GeometriesModuleConfig = {
colorConfig: {
fillColor: ['match', ['get', 'category'], 'park', '#4CAF50', 'water', '#2196F3', '#9E9E9E'],
fillOpacity: 0.4
},
lineConfig: {
lineColor: '#000000',
lineWidth: ['case', ['get', 'highlighted'], 4, 2]
},
textConfig: {
textField: ['concat', ['get', 'name'], '\n', ['get', 'area'], ' km²']
}
};
Configuration options for the GeometriesModule.
Controls the visual appearance and positioning of polygon geometries displayed on the map.