I want to cluster points using the MapLibre (open-source alternative to mapbox) GL-JS. As i do not want to render points on the map, I tried to user the method minClusterPoints documentation: and set the value to 1 (default value is 2)
I hoped that this will result in MapLibre rendering clusters even for geographically isolated points, but somehow it does not work. as you can see here, MapLibre does not generate a cluster for the two isolated points
map.addSource('users', {
type: 'geojson',
data: geoJSON,
cluster: true,
clusterMinPoints: 1,
clusterMaxZoom: 10, // Max zoom to cluster points on
clusterRadius: 50, // Radius of each cluster when clustering points (defaults to 50)
});
Here is the corresponding code. Any tips?