[Pkg-javascript-commits] [leaflet-markercluster] 28/219: Make chunked=false option work. woops.
Jonas Smedegaard
dr at jones.dk
Sat May 7 09:39:08 UTC 2016
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository leaflet-markercluster.
commit 4f19c14739a841961a509d4937e499546306b044
Author: danzel <danzel at localhost.geek.nz>
Date: Fri Jan 31 09:07:26 2014 +1300
Make chunked=false option work. woops.
---
src/MarkerClusterGroup.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index cc7de90..bde4a8b 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -160,6 +160,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
addLayers: function (layersArray) {
var fg = this._featureGroup,
npg = this._nonPointGroup,
+ chunked = this.options.chunkedLoading,
chunkInterval = this.options.chunkInterval,
chunkProgress = this.options.chunkProgress,
newMarkers, i, l, m;
@@ -170,7 +171,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
var process = L.bind(function () {
var start = (new Date()).getTime();
for (; offset < layersArray.length; offset++) {
- if (offset % 200 === 0) {
+ if (chunked && offset % 200 === 0) {
// every couple hundred markers, instrument the time elapsed since processing started:
var elapsed = (new Date()).getTime() - start;
if (elapsed > chunkInterval) {
--
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