Rendering vector layers

This commit is contained in:
Tim Schaub
2013-01-22 01:36:32 -07:00
parent 92c8c9c5df
commit 1dd17fc88f
4 changed files with 166 additions and 31 deletions

View File

@@ -132,7 +132,6 @@ ol.source.VectorOptions;
/**
* @constructor
* @extends {ol.source.Source}
@@ -150,19 +149,16 @@ ol.source.Vector = function(options) {
* @type {ol.source.FeatureCache}
* @private
*/
this.featureCache_ = null;
this.featureCache_ = new ol.source.FeatureCache();
};
goog.inherits(ol.source.Vector, ol.source.Source);
/**
* @param {Array.<ol.Feature>} features Array of features.
*/
ol.source.Vector.prototype.setFeatures = function(features) {
this.featureCache_.clear();
ol.source.Vector.prototype.addFeatures = function(features) {
for (var i = 0, ii = features.length; i < ii; ++i) {
this.featureCache_.add(features[i]);
}