From 6235c283f221d9b05e3a0124f8e06aac7646da22 Mon Sep 17 00:00:00 2001 From: danzel Date: Tue, 11 Sep 2012 15:25:53 +1200 Subject: [PATCH] bit more dead code --- src/MarkerCluster.js | 16 +++------------- src/MarkerClusterGroup.js | 3 --- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/MarkerCluster.js b/src/MarkerCluster.js index 6485cb640..622251f7b 100644 --- a/src/MarkerCluster.js +++ b/src/MarkerCluster.js @@ -47,6 +47,7 @@ L.MarkerCluster = L.Marker.extend({ this._group._map.fitBounds(this._bounds); }, + _updateIcon: function () { this._iconNeedsUpdate = true; if (this._icon) { @@ -54,7 +55,7 @@ L.MarkerCluster = L.Marker.extend({ } }, - //Cludge for Icon + //Cludge for Icon, we pretend to be an icon for performance createIcon: function () { if (this._iconNeedsUpdate) { this._iconObj = this._group.options.iconCreateFunction(this); @@ -66,6 +67,7 @@ L.MarkerCluster = L.Marker.extend({ return this._iconObj.createShadow(); }, + _addChild: function (new1, isNotificationFromChild) { this._iconNeedsUpdate = true; @@ -127,18 +129,6 @@ L.MarkerCluster = L.Marker.extend({ } L.FeatureGroup.prototype.addLayer.call(this._group, this); }, - - _canAcceptPosition: function (latlng, zoom) { - if (this._childCount === 0) { - return true; - } - - var clusterRadiusSqrd = this._group.options.maxClusterRadius * this._group.options.maxClusterRadius, - pos = this._group._map.project(this._cLatLng, zoom), - otherpos = this._group._map.project(latlng, zoom); - - return (this._group._sqDist(pos, otherpos) <= clusterRadiusSqrd); - }, _recursivelyAnimateChildrenIn: function (bounds, center, depth) { this._recursively(bounds, 0, depth - 1, diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js index b6e779597..0282d4ea8 100644 --- a/src/MarkerClusterGroup.js +++ b/src/MarkerClusterGroup.js @@ -85,8 +85,6 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({ } } - //TODO: Find the highest visible blah - if (this.options.animateAddingMarkers) { this._animationAddLayer(layer, visibleLayer); } else { @@ -488,7 +486,6 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({ } else { newCluster._updateIcon(); } - //TODO else update icon? } });