Optionalcluster?: PlacesClusterConfigHow the pin-clustered theme clusters places and draws the cluster badge.
Optionalconnections?: PlaceConnectionsConfigConfiguration for connection lines drawn between places via PlacesModule.showConnections.
OptionalentryPoints?: PlaceEntryPointsConfigConfiguration for drawing the entry points of the shown places.
OptionalevAvailability?: EVAvailabilityConfigConfiguration for EV charging station availability display.
OptionalextraFeatureProps?: Record<string, ExtraFeatureProp<P>>Additional properties to compute for each place feature.
These properties are added to the feature and can be used in styling expressions or event handlers. Values can be static or computed from place data.
Useful for:
extraFeatureProps: {
// Static property
source: 'search-results',
// Computed property
category: (place) => place.properties.poi?.categories?.[0],
rating: (place) => place.properties.poi?.rating || 0,
hasOpeningHours: (place) => !!place.properties.poi?.openingHours,
// Complex computation
distanceFromCenter: (place) => {
const coords = place.geometry.coordinates;
return Math.sqrt(Math.pow(coords[0] - 4.9, 2) + Math.pow(coords[1] - 52.3, 2));
}
}
Optionalicon?: PlaceIconConfigIcon appearance configuration.
Controls marker style and custom icons for different place categories.
Optionallayers?: PlaceLayersConfigCustom layer styling configuration.
Optionaltext?: PlaceTextConfigText label configuration.
Controls label content, styling, and positioning.
Optionaltheme?: PlacesThemeBase style for all places.
Optionalvisible?: booleanWhether the module draws anything: places, connections and entry points.
show() and clear() never change it — a hidden module keeps its data until
PlacesModule.setVisible shows it again. Layers the theme does not use, and any hidden
through layers, stay hidden while the module is shown.
// Basic configuration
const config: PlacesModuleConfig = {
icon: {
style: 'pin'
},
text: {
field: (place) => place.properties.poi?.name || 'Unknown',
size: 12
}
};
// Advanced configuration with custom properties
const config: PlacesModuleConfig = {
icon: {
style: 'base-map',
categoryIcons: [
{ category: 'RESTAURANT', image: '/icons/restaurant.png' }
]
},
text: {
field: ['get', 'title'],
size: 14,
color: '#333',
haloColor: '#fff',
haloWidth: 2
},
extraFeatureProps: {
category: (place) => place.properties.poi?.localizedCategories?.[0],
hasParking: (place) => place.properties.poi?.name?.includes('parking')
}
};
Configuration options for the PlacesModule.
Controls the appearance and behavior of place markers and labels displayed on the map.