diff --git a/src/MarkerCluster.js b/src/MarkerCluster.js index 8c13f2ee0..b79e7390b 100644 --- a/src/MarkerCluster.js +++ b/src/MarkerCluster.js @@ -74,7 +74,6 @@ L.MarkerCluster = L.Marker.extend({ _recursivelyRemoveChildMarker: function(layer) { var markers = this._markers, childClusters = this._childClusters, - newChildCount = 0, i; //Check our children @@ -95,7 +94,6 @@ L.MarkerCluster = L.Marker.extend({ for (i = childClusters.length - 1; i >= 0; i--) { if (childClusters[i]._recursivelyRemoveChildMarker(layer)) { this._childCount--; - //TODO: If child is now 1 then remove it and add a marker //TODO? Recalculate bounds if (this._icon) { diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js index 29cfca6fb..91fd1d410 100644 --- a/src/MarkerClusterGroup.js +++ b/src/MarkerClusterGroup.js @@ -107,8 +107,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({ //Merge and split any existing clusters that are too big or small _mergeSplitClusters: function () { - var map = this._map, - newState, + var newState, depth = Math.abs(this._map._zoom - this._zoom); if (this._zoom < this._map._zoom) { //Zoom in, split @@ -216,7 +215,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({ removeLayer: function (layer) { var current = this._markersAndClustersAtZoom[this._map._zoom], i = current.unclustered.indexOf(layer), - cluster, result, killParents = false; + killParents = false; //TODO: This whole thing could probably be better @@ -276,7 +275,6 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({ var clusterRadiusSqrd = this.options.maxClusterRadius * this.options.maxClusterRadius, clusters = existingClusters, unclustered = existingUnclustered, - center = this._map.getCenter(), i, j, c; //Calculate pixel positions