Rename _recursivelyAddChildMarker -> _recursivelyAddLayer

This commit is contained in:
danzel
2012-07-20 11:11:28 +12:00
parent f5cac38268
commit eb94ab1959
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -77,7 +77,7 @@ L.MarkerCluster = L.Marker.extend({
},
//layer: The layer to try add
_recursivelyAddChildMarker: function (layer) {
_recursivelyAddLayer: function (layer) {
var childReturn = null;
if (!this._haveGeneratedChildClusters) {
@@ -87,7 +87,7 @@ L.MarkerCluster = L.Marker.extend({
for (var i = this._childClusters.length - 1; i >= 0; i--) {
var c = this._childClusters[i];
if (c._bounds.contains(layer.getLatLng())) { //TODO: Use a layer distance calculation
childReturn = c._recursivelyAddChildMarker(layer);
childReturn = c._recursivelyAddLayer(layer);
addedToChild = true;
break;
}
@@ -110,7 +110,7 @@ L.MarkerCluster = L.Marker.extend({
//Removes the given node from this marker cluster (or its child as required)
//Returns true if it (or a child cluster) removes the marker
_recursivelyRemoveChildMarker: function(layer) {
_recursivelyRemoveLayer: function (layer) {
var markers = this._markers,
childClusters = this._childClusters,
i;
+1 -1
View File
@@ -135,7 +135,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
//If we have already clustered we'll need to add this one to a cluster
L.FeatureGroup.prototype.addLayer.call(this, layer); //TODO: If not animated maybe don't add it yet
position = this._topClusterLevel._recursivelyAddChildMarker(layer);
position = this._topClusterLevel._recursivelyAddLayer(layer);
if (position) {
//TODO Tidy up