Use a BBOX loading strategy by default

This commit is contained in:
Tom Payne
2014-03-17 17:19:14 +01:00
parent 9e75684823
commit db1a06ac31
2 changed files with 4 additions and 2 deletions

View File

@@ -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)} loadingFunction Loading function.
* @property {function(ol.Extent, number): Array.<ol.Extent>} loadingStrategy Loading strategy.
* @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

@@ -3,6 +3,7 @@
goog.provide('ol.source.ServerVector');
goog.require('ol.extent');
goog.require('ol.loadingstrategy');
goog.require('ol.source.FormatVector');
goog.require('ol.structs.RBush');
@@ -40,7 +41,8 @@ ol.source.ServerVector = function(options) {
* @private
* @type {function(ol.Extent, number): Array.<ol.Extent>}
*/
this.loadingStrategy_ = options.loadingStrategy;
this.loadingStrategy_ = goog.isDef(options.loadingStrategy) ?
options.loadingStrategy : ol.loadingstrategy.bbox;
/**
* @private