Add ability to change the loader of a vector source

This commit is contained in:
bartvde
2017-09-20 10:24:18 +02:00
parent 5c49371198
commit bbde224f50
2 changed files with 34 additions and 0 deletions

View File

@@ -823,6 +823,17 @@ ol.source.Vector.prototype.removeFromIdIndex_ = function(feature) {
};
/**
* Set the new loader of the source. The next loadFeatures call will use the
* new loader.
* @param {ol.FeatureLoader} loader The loader to set.
* @api
*/
ol.source.Vector.prototype.setLoader = function(loader) {
this.loader_ = loader;
};
/**
* @classdesc
* Events emitted by {@link ol.source.Vector} instances are instances of this