[Pkg-javascript-commits] [leaflet-markercluster] 141/479: Update the build
Jonas Smedegaard
dr at jones.dk
Thu Oct 16 16:00:22 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 a0d3ad92cfe67219adb388e87d2bb0f9610a007a
Author: danzel <danzel at localhost.geek.nz>
Date: Thu Aug 2 10:16:22 2012 +1200
Update the build
---
dist/leaflet.markercluster-src.js | 18 ++++++++++++++++++
dist/leaflet.markercluster.js | 2 +-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/dist/leaflet.markercluster-src.js b/dist/leaflet.markercluster-src.js
index f1e7d8d..5513cdb 100644
--- a/dist/leaflet.markercluster-src.js
+++ b/dist/leaflet.markercluster-src.js
@@ -70,6 +70,22 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
return this;
},
+ clearLayers: function () {
+ //Need our own special implementation as the LayerGroup one doesn't work for us
+
+ //Remove all the visible layers
+ for (var i in this._layers) {
+ if (this._layers.hasOwnProperty(i)) {
+ L.FeatureGroup.prototype.removeLayer.call(this, this._layers[i]);
+ }
+ }
+
+ //Reset _topClusterLevel
+ this._generateInitialClusters();
+
+ return this;
+ },
+
//Overrides FeatureGroup.onAdd
onAdd: function (map) {
L.FeatureGroup.prototype.onAdd.call(this, map);
@@ -77,6 +93,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
if (!this._topClusterLevel) {
this._generateInitialClusters();
}
+
this._map.on('zoomend', this._zoomEnd, this);
this._map.on('moveend', this._moveEnd, this);
@@ -206,6 +223,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
currentZoom = this._map.getZoom();
this._topClusterLevel = this._clusterToMarkerCluster(this._needsClustering, maxZoom);
+ this._needsClustering = [];
//Generate to the top
while (minZoom < this._topClusterLevel._zoom) {
diff --git a/dist/leaflet.markercluster.js b/dist/leaflet.markercluster.js
index 1d777dc..cc75acf 100644
--- a/dist/leaflet.markercluster.js
+++ b/dist/leaflet.markercluster.js
@@ -3,4 +3,4 @@
Leaflet.markercluster is an open-source JavaScript library for Marker Clustering on leaflet powered maps.
https://github.com/danzel/Leaflet.markercluster
*/
-(function(e,t){L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:60,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0},initialize:function(e){L.Util.setOptions(this,e),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),L.FeatureGroup.prototype.initialize.call(this,[]),this._inZoomAnimation=0,this._needsClustering=[],this._currentShownBounds=null},addLayer:function(e){if(!this._map [...]
\ No newline at end of file
+(function(e,t){L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:60,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0},initialize:function(e){L.Util.setOptions(this,e),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),L.FeatureGroup.prototype.initialize.call(this,[]),this._inZoomAnimation=0,this._needsClustering=[],this._currentShownBounds=null},addLayer:function(e){if(!this._map [...]
\ No newline at end of file
--
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