Rename loadingFunction to loader

This commit is contained in:
Tim Schaub
2014-03-20 08:18:06 -06:00
committed by Tom Payne
parent db1a06ac31
commit ce8d805201
3 changed files with 4 additions and 4 deletions

View File

@@ -89,7 +89,7 @@ var styles = {
var vectorSource = new ol.source.ServerVector({
format: new ol.format.OSMXML(),
loadingFunction: function(extent, resolution, projection) {
loader: function(extent, resolution, projection) {
var transform = ol.proj.getTransform(projection, 'EPSG:4326');
var epsg4326Extent = transform(extent, []);
var url = 'http://overpass-api.de/api/xapi?map?bbox=' +

View File

@@ -909,7 +909,7 @@
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
* @property {ol.Extent|undefined} extent Extent.
* @property {ol.format.Feature} format Format.
* @property {function(this: ol.source.ServerVector, ol.Extent, number, ol.proj.Projection)} loadingFunction Loading function.
* @property {function(this: ol.source.ServerVector, ol.Extent, number, ol.proj.Projection)} loader Loading function.
* @property {function(ol.Extent, number): Array.<ol.Extent>|undefined} loadingStrategy Loading strategy. Default is `ol.loadingstrategy.bbox`.
* @property {string|undefined} logo Logo.
* @property {ol.proj.ProjectionLike} projection Projection.

View File

@@ -35,7 +35,7 @@ ol.source.ServerVector = function(options) {
* @type {function(this: ol.source.ServerVector, ol.Extent, number,
* ol.proj.Projection): string}
*/
this.loadingFunction_ = options.loadingFunction;
this.loader_ = options.loader;
/**
* @private
@@ -92,7 +92,7 @@ ol.source.ServerVector.prototype.loadFeatures =
return ol.extent.containsExtent(object.extent, extentToLoad);
});
if (!alreadyLoaded) {
this.loadingFunction_.call(this, extentToLoad, resolution, projection);
this.loader_.call(this, extentToLoad, resolution, projection);
loadedExtents.insert(extentToLoad, {extent: extentToLoad.slice()});
}
}