[Pkg-javascript-commits] [leaflet-markercluster] 24/479: Add zoomToBounds to MarkerCluster. Fixes #6
    Jonas Smedegaard 
    dr at jones.dk
       
    Thu Oct 16 16:00:04 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 02adc3a1b18c283f13a2c9bf51f84aea7a5826ff
Author: danzel <danzel at localhost.geek.nz>
Date:   Tue Jul 17 14:07:52 2012 +1200
    Add zoomToBounds to MarkerCluster. Fixes #6
---
 src/MarkerCluster.js | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/src/MarkerCluster.js b/src/MarkerCluster.js
index b79e739..627933d 100644
--- a/src/MarkerCluster.js
+++ b/src/MarkerCluster.js
@@ -29,6 +29,11 @@ L.MarkerCluster = L.Marker.extend({
 		return storageArray;
 	},
 
+	//Zoom to the extents of this cluster
+	zoomToBounds: function () {
+		this._group._map.fitBounds(this._bounds);
+	},
+
 	_baseInit: function () {
 		L.Marker.prototype.initialize.call(this, this._latlng, { icon: this._group.options.iconCreateFunction(this._childCount) });
 	},
-- 
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