Add ol.source.Vector#addFeatures

This commit is contained in:
Tom Payne
2013-12-19 13:23:35 +01:00
parent e6c66d3678
commit 0912c8f6ea
2 changed files with 9 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
@exportSymbol ol.source.Vector
@exportProperty ol.source.Vector.prototype.addFeature
@exportProperty ol.source.Vector.prototype.addFeatures
@exportProperty ol.source.Vector.prototype.getClosestFeatureToCoordinate
@exportProperty ol.source.Vector.prototype.forEachFeature
@exportProperty ol.source.Vector.prototype.getAllFeatures

View File

@@ -102,6 +102,14 @@ ol.source.Vector.prototype.addFeatureInternal = function(feature) {
}
this.dispatchEvent(
new ol.source.VectorEvent(ol.source.VectorEventType.ADDFEATURE, feature));
};
/**
* @param {Array.<ol.Feature>} features Features.
*/
ol.source.Vector.prototype.addFeatures = function(features) {
this.addFeaturesInternal(features);
this.dispatchChangeEvent();
};