From 208c85ca7964b962d5eea3034b884e3eaaf5c5e8 Mon Sep 17 00:00:00 2001 From: Alec Winograd Date: Mon, 20 Aug 2012 16:33:08 -0700 Subject: [PATCH] Utilize option to clusterSingleMarkers --- src/MarkerClusterGroup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js index f56c2428f..adc47fb73 100644 --- a/src/MarkerClusterGroup.js +++ b/src/MarkerClusterGroup.js @@ -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;