Utilize option to clusterSingleMarkers

This commit is contained in:
Alec Winograd
2012-08-20 16:33:08 -07:00
parent 9ad78ab809
commit 208c85ca79
+1 -1
View File
@@ -327,7 +327,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
// any clusters that did not end up being a child of a new cluster, make them a child of a new cluster
unclustered.eachObject(function (cluster) {
if (cluster instanceof L.MarkerCluster) {
if (cluster instanceof L.MarkerCluster || (group.options.clusterSingleMarkers && cluster instanceof L.Marker)) {
newCluster = new L.MarkerCluster(group, cluster);
newCluster._haveGeneratedChildClusters = true;