Merge pull request #5443 from fredj/max_zoom_options
Remove olx.source.WMTSOptions#maxZoom option
This commit is contained in:
@@ -5598,7 +5598,6 @@ olx.source.TileJSONOptions.prototype.wrapX;
|
||||
* hidpi: (boolean|undefined),
|
||||
* logo: (string|olx.LogoOptions|undefined),
|
||||
* tileGrid: (ol.tilegrid.TileGrid|undefined),
|
||||
* maxZoom: (number|undefined),
|
||||
* projection: ol.ProjectionLike,
|
||||
* reprojectionErrorThreshold: (number|undefined),
|
||||
* serverType: (ol.source.wms.ServerType|string|undefined),
|
||||
@@ -5692,14 +5691,6 @@ olx.source.TileWMSOptions.prototype.logo;
|
||||
olx.source.TileWMSOptions.prototype.tileGrid;
|
||||
|
||||
|
||||
/**
|
||||
* Maximum zoom.
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.source.TileWMSOptions.prototype.maxZoom;
|
||||
|
||||
|
||||
/**
|
||||
* Projection.
|
||||
* @type {ol.ProjectionLike}
|
||||
@@ -5903,7 +5894,6 @@ olx.source.VectorOptions.prototype.wrapX;
|
||||
* matrixSet: string,
|
||||
* dimensions: (!Object|undefined),
|
||||
* url: (string|undefined),
|
||||
* maxZoom: (number|undefined),
|
||||
* tileLoadFunction: (ol.TileLoadFunctionType|undefined),
|
||||
* urls: (Array.<string>|undefined),
|
||||
* tileClass: (function(new: ol.ImageTile, ol.TileCoord,
|
||||
@@ -6064,14 +6054,6 @@ olx.source.WMTSOptions.prototype.dimensions;
|
||||
olx.source.WMTSOptions.prototype.url;
|
||||
|
||||
|
||||
/**
|
||||
* Maximum zoom.
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.source.WMTSOptions.prototype.maxZoom;
|
||||
|
||||
|
||||
/**
|
||||
* Optional function to load a tile given a URL. The default is
|
||||
* ```js
|
||||
|
||||
@@ -105,8 +105,8 @@ ol.source.Stamen = function(options) {
|
||||
attributions: ol.source.Stamen.ATTRIBUTIONS,
|
||||
cacheSize: options.cacheSize,
|
||||
crossOrigin: 'anonymous',
|
||||
maxZoom: providerConfig.maxZoom,
|
||||
minZoom: providerConfig.minZoom,
|
||||
maxZoom: options.maxZoom != undefined ? options.maxZoom : providerConfig.maxZoom,
|
||||
minZoom: options.minZoom != undefined ? options.minZoom : providerConfig.minZoom,
|
||||
opaque: layerConfig.opaque,
|
||||
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
|
||||
tileLoadFunction: options.tileLoadFunction,
|
||||
|
||||
28
test/spec/ol/source/stamensource.test.js
Normal file
28
test/spec/ol/source/stamensource.test.js
Normal file
@@ -0,0 +1,28 @@
|
||||
goog.provide('ol.test.source.Stamen');
|
||||
|
||||
describe('ol.source.Stamen', function() {
|
||||
|
||||
describe('constructor', function() {
|
||||
|
||||
it('can be constructed with a custom minZoom', function() {
|
||||
var source = new ol.source.Stamen({
|
||||
layer: 'watercolor',
|
||||
minZoom: 10
|
||||
});
|
||||
expect(source.getTileGrid().getMinZoom()).to.be(10);
|
||||
});
|
||||
|
||||
it('can be constructed with a custom maxZoom', function() {
|
||||
var source = new ol.source.Stamen({
|
||||
layer: 'watercolor',
|
||||
maxZoom: 8
|
||||
});
|
||||
expect(source.getTileGrid().getMaxZoom()).to.be(8);
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
goog.require('ol.source.Stamen');
|
||||
Reference in New Issue
Block a user