I am using Leaflet.markercluster.
This is my code, basd upon the various related questions:
// Takes an L.markerClusterGroup as input parameter
Self.GetNumMarkersInClusterGroup = function(clusterGroup)
{
Self.map.eachLayer(function (layer) {
if (layer.getChildCount) {
// somehow need to check here for our desired cluter group
console.log('Cluster group has ' + layer._childClusters.length + 'layers') ;
console.log('With a total of ' + layer._childCount + ' markers');
}
});
} // GetNumMarkersInClusterGroup()
but, layer.getChildCount
is undefined :-( What am I doing wrongly?
Related questions: