OptionalbadgeAppearance of the cluster count badge.
OptionalsourceHow places group into clusters, set on the underlying GeoJSON source.
markerType: 'pin-clustered' switches it on.const places = await PlacesModule.create(map, {
markerType: 'pin-clustered',
cluster: {
source: {
radius: 100,
maxZoom: 14,
minPoints: 3,
// Total charging points across the cluster
properties: { connectors: ['+', ['get', 'connectorCount']] }
},
},
layers: {
clusterCount: { layout: { 'text-field': ['get', 'connectors'] } }
}
});
Configuration for the
pin-clusteredmarker type.Remarks
Ignored by every other PlacesMarkerType.
Example