OptionalevAvailability?: EVAvailabilityConfigConfiguration for EV charging station availability display.
OptionalextraFeatureProps?: { [key: string]: any }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.
// 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?.categories?.[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.