@mollymerp, supercluster getChildren(clusterId, clusterZoom), .
https://jsfiddle.net/denistsoi/bhzr6hpt/3/
- getLeaves, getChildren , ,
map.addSource('data', {
type: 'geojson',
data: [GEOJSON]
});
map.on('click', function(e) {
var cluster = map.queryRenderedFeatures(e.point, { layers: ["cluster"] });
if (cluster.length) {
var superc = supercluster({
radius: 40,
maxZoom: 16
})
superc.load(map.getSource('data').serialize().data.features);
var children = superc.getChildren(0, map.getZoom());
console.log(children);
}
});