I'm using superclsuter for clustering markers in react native map, what I want is to get all children from a cluster no matter what level of nesting a cluster may have.
to explain the situation a little better, a cluster can have markers and other clusters as children, I need to flatten the child clusters to get markers inside them.
cluster
marker
cluster(3 markers)
// this should return the 4 markers, the top-level marker, and markers within the child cluster
I know it is late for an answer, but this solution is for google map using google-map-react package.
First on initializing the map options, add maxZoom and minZoom. maxZoom must be equal to supercluster max-zoom
On cluster rendering use this code:
if(isCluster){
}
return Normal or Custom marker;
For cluster reference: https://www.leighhalliday.com/google-maps-clustering