[Pkg-javascript-commits] [leaflet-markercluster] 210/479: Use the _wLatLng of a child cluster for its weighting. Keep the same cLatLng as our child clusters.
Jonas Smedegaard
dr at jones.dk
Thu Oct 16 16:00:30 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 6fe95a3a42e1098fb930a254fc2c9533658f3d29
Author: danzel <danzel at localhost.geek.nz>
Date: Mon Sep 10 16:09:45 2012 +1200
Use the _wLatLng of a child cluster for its weighting. Keep the same cLatLng as our child clusters.
---
src/MarkerCluster.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/MarkerCluster.js b/src/MarkerCluster.js
index 2f08939..3106840 100644
--- a/src/MarkerCluster.js
+++ b/src/MarkerCluster.js
@@ -65,7 +65,7 @@ L.MarkerCluster = L.Marker.extend({
_expandBounds: function (marker) {
var addedCount,
- addedLatLng = marker._latlng;
+ addedLatLng = marker._wLatLng || marker._latlng;
if (marker instanceof L.MarkerCluster) {
this._bounds.extend(marker._bounds);
@@ -77,7 +77,7 @@ L.MarkerCluster = L.Marker.extend({
if (!this._latlng) {
// when clustering, take position of the first point as the cluster center
- this._latlng = this._cLatLng = addedLatLng;
+ this._latlng = this._cLatLng = marker._cLatLng || addedLatLng;
}
// when showing clusters, take weighted average of all points as cluster center
--
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