Rename loadingFunction to loader
This commit is contained in:
@@ -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=' +
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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()});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user