[Pkg-javascript-commits] [leaflet-markercluster] 67/479: Pass the right zoom level in so that clustering happens at the right scale

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:00:10 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet-markercluster.

commit d8317c04baeaff39f65e3aa8e1ab6e46f27780df
Author: danzel <danzel at localhost.geek.nz>
Date:   Fri Jul 20 16:27:33 2012 +1200

    Pass the right zoom level in so that clustering happens at the right scale
---
 src/MarkerClusterGroup.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index 40214be..e14bd78 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -134,7 +134,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 
 		//If we have already clustered we'll need to add this one to a cluster
 
-		newCluster = this._topClusterLevel._recursivelyAddLayer(layer, this._topClusterLevel._zoom);
+		newCluster = this._topClusterLevel._recursivelyAddLayer(layer, this._topClusterLevel._zoom - 1);
 
 		this._animationAddLayer(layer, newCluster);
 
@@ -210,7 +210,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 
 			//otherwise, look through all of the markers we haven't managed to cluster and see if we should form a cluster with them
 			if (!used) {
-				var newCluster = this._clusterOne(unclustered, point, hasChildClusters);
+				var newCluster = this._clusterOne(unclustered, point);
 				if (newCluster) {
 					newCluster._haveGeneratedChildClusters = hasChildClusters;
 					newCluster._projCenter = this._map.project(newCluster.getLatLng(), zoom);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet-markercluster.git



More information about the Pkg-javascript-commits mailing list