Rename loadingStrategy to strategy
This commit is contained in:
@@ -98,7 +98,7 @@ var vectorSource = new ol.source.ServerVector({
|
|||||||
vectorSource.readFeatures(response);
|
vectorSource.readFeatures(response);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
loadingStrategy: ol.loadingstrategy.createTile(new ol.tilegrid.XYZ({
|
strategy: ol.loadingstrategy.createTile(new ol.tilegrid.XYZ({
|
||||||
maxZoom: 19
|
maxZoom: 19
|
||||||
})),
|
})),
|
||||||
projection: 'EPSG:3857'
|
projection: 'EPSG:3857'
|
||||||
|
|||||||
@@ -910,7 +910,7 @@
|
|||||||
* @property {ol.Extent|undefined} extent Extent.
|
* @property {ol.Extent|undefined} extent Extent.
|
||||||
* @property {ol.format.Feature} format Format.
|
* @property {ol.format.Feature} format Format.
|
||||||
* @property {function(this: ol.source.ServerVector, ol.Extent, number, ol.proj.Projection)} loader 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 {function(ol.Extent, number): Array.<ol.Extent>|undefined} strategy Loading strategy. Default is `ol.loadingstrategy.bbox`.
|
||||||
* @property {string|undefined} logo Logo.
|
* @property {string|undefined} logo Logo.
|
||||||
* @property {ol.proj.ProjectionLike} projection Projection.
|
* @property {ol.proj.ProjectionLike} projection Projection.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ ol.source.ServerVector = function(options) {
|
|||||||
* @private
|
* @private
|
||||||
* @type {function(ol.Extent, number): Array.<ol.Extent>}
|
* @type {function(ol.Extent, number): Array.<ol.Extent>}
|
||||||
*/
|
*/
|
||||||
this.loadingStrategy_ = goog.isDef(options.loadingStrategy) ?
|
this.strategy_ = goog.isDef(options.strategy) ?
|
||||||
options.loadingStrategy : ol.loadingstrategy.bbox;
|
options.strategy : ol.loadingstrategy.bbox;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -79,7 +79,7 @@ ol.source.ServerVector.prototype.addFeaturesInternal = function(features) {
|
|||||||
ol.source.ServerVector.prototype.loadFeatures =
|
ol.source.ServerVector.prototype.loadFeatures =
|
||||||
function(extent, resolution, projection) {
|
function(extent, resolution, projection) {
|
||||||
var loadedExtents = this.loadedExtents_;
|
var loadedExtents = this.loadedExtents_;
|
||||||
var extentsToLoad = this.loadingStrategy_(extent, resolution);
|
var extentsToLoad = this.strategy_(extent, resolution);
|
||||||
var i, ii;
|
var i, ii;
|
||||||
for (i = 0, ii = extentsToLoad.length; i < ii; ++i) {
|
for (i = 0, ii = extentsToLoad.length; i < ii; ++i) {
|
||||||
var extentToLoad = extentsToLoad[i];
|
var extentToLoad = extentsToLoad[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user