diff --git a/examples/vector-osm.js b/examples/vector-osm.js index 8b5bcf90f4..8dd778508b 100644 --- a/examples/vector-osm.js +++ b/examples/vector-osm.js @@ -98,7 +98,7 @@ var vectorSource = new ol.source.ServerVector({ vectorSource.readFeatures(response); }); }, - loadingStrategy: ol.loadingstrategy.createTile(new ol.tilegrid.XYZ({ + strategy: ol.loadingstrategy.createTile(new ol.tilegrid.XYZ({ maxZoom: 19 })), projection: 'EPSG:3857' diff --git a/src/objectliterals.jsdoc b/src/objectliterals.jsdoc index c9e90714e7..c9410a7a5d 100644 --- a/src/objectliterals.jsdoc +++ b/src/objectliterals.jsdoc @@ -910,7 +910,7 @@ * @property {ol.Extent|undefined} extent Extent. * @property {ol.format.Feature} format Format. * @property {function(this: ol.source.ServerVector, ol.Extent, number, ol.proj.Projection)} loader Loading function. - * @property {function(ol.Extent, number): Array.|undefined} loadingStrategy Loading strategy. Default is `ol.loadingstrategy.bbox`. + * @property {function(ol.Extent, number): Array.|undefined} strategy Loading strategy. Default is `ol.loadingstrategy.bbox`. * @property {string|undefined} logo Logo. * @property {ol.proj.ProjectionLike} projection Projection. */ diff --git a/src/ol/source/servervectorsource.js b/src/ol/source/servervectorsource.js index 34f8752bf4..f10085c2b8 100644 --- a/src/ol/source/servervectorsource.js +++ b/src/ol/source/servervectorsource.js @@ -41,8 +41,8 @@ ol.source.ServerVector = function(options) { * @private * @type {function(ol.Extent, number): Array.} */ - this.loadingStrategy_ = goog.isDef(options.loadingStrategy) ? - options.loadingStrategy : ol.loadingstrategy.bbox; + this.strategy_ = goog.isDef(options.strategy) ? + options.strategy : ol.loadingstrategy.bbox; /** * @private @@ -79,7 +79,7 @@ ol.source.ServerVector.prototype.addFeaturesInternal = function(features) { ol.source.ServerVector.prototype.loadFeatures = function(extent, resolution, projection) { var loadedExtents = this.loadedExtents_; - var extentsToLoad = this.loadingStrategy_(extent, resolution); + var extentsToLoad = this.strategy_(extent, resolution); var i, ii; for (i = 0, ii = extentsToLoad.length; i < ii; ++i) { var extentToLoad = extentsToLoad[i];