From e6c66d36785eeb56e86e7b2433a115921556acd3 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Thu, 19 Dec 2013 13:21:51 +0100 Subject: [PATCH] Add ol.source.Vector#addFeaturesInternal --- src/ol/source/vectorsource.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/ol/source/vectorsource.js b/src/ol/source/vectorsource.js index 4de918438a..2e4b3240b2 100644 --- a/src/ol/source/vectorsource.js +++ b/src/ol/source/vectorsource.js @@ -106,6 +106,20 @@ ol.source.Vector.prototype.addFeatureInternal = function(feature) { }; +/** + * Add features without firing a `change` event. + * @param {Array.} features Features. + * @protected + */ +ol.source.Vector.prototype.addFeaturesInternal = function(features) { + // FIXME use R-Bush bulk load when available + var i, ii; + for (i = 0, ii = features.length; i < ii; ++i) { + this.addFeatureInternal(features[i]); + } +}; + + /** * FIXME empty description for jsdoc */