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),
|
* hidpi: (boolean|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
* logo: (string|olx.LogoOptions|undefined),
|
||||||
* tileGrid: (ol.tilegrid.TileGrid|undefined),
|
* tileGrid: (ol.tilegrid.TileGrid|undefined),
|
||||||
* maxZoom: (number|undefined),
|
|
||||||
* projection: ol.ProjectionLike,
|
* projection: ol.ProjectionLike,
|
||||||
* reprojectionErrorThreshold: (number|undefined),
|
* reprojectionErrorThreshold: (number|undefined),
|
||||||
* serverType: (ol.source.wms.ServerType|string|undefined),
|
* serverType: (ol.source.wms.ServerType|string|undefined),
|
||||||
@@ -5692,14 +5691,6 @@ olx.source.TileWMSOptions.prototype.logo;
|
|||||||
olx.source.TileWMSOptions.prototype.tileGrid;
|
olx.source.TileWMSOptions.prototype.tileGrid;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Maximum zoom.
|
|
||||||
* @type {number|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.TileWMSOptions.prototype.maxZoom;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Projection.
|
* Projection.
|
||||||
* @type {ol.ProjectionLike}
|
* @type {ol.ProjectionLike}
|
||||||
@@ -5903,7 +5894,6 @@ olx.source.VectorOptions.prototype.wrapX;
|
|||||||
* matrixSet: string,
|
* matrixSet: string,
|
||||||
* dimensions: (!Object|undefined),
|
* dimensions: (!Object|undefined),
|
||||||
* url: (string|undefined),
|
* url: (string|undefined),
|
||||||
* maxZoom: (number|undefined),
|
|
||||||
* tileLoadFunction: (ol.TileLoadFunctionType|undefined),
|
* tileLoadFunction: (ol.TileLoadFunctionType|undefined),
|
||||||
* urls: (Array.<string>|undefined),
|
* urls: (Array.<string>|undefined),
|
||||||
* tileClass: (function(new: ol.ImageTile, ol.TileCoord,
|
* tileClass: (function(new: ol.ImageTile, ol.TileCoord,
|
||||||
@@ -6064,14 +6054,6 @@ olx.source.WMTSOptions.prototype.dimensions;
|
|||||||
olx.source.WMTSOptions.prototype.url;
|
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
|
* Optional function to load a tile given a URL. The default is
|
||||||
* ```js
|
* ```js
|
||||||
|
|||||||
@@ -105,8 +105,8 @@ ol.source.Stamen = function(options) {
|
|||||||
attributions: ol.source.Stamen.ATTRIBUTIONS,
|
attributions: ol.source.Stamen.ATTRIBUTIONS,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
crossOrigin: 'anonymous',
|
crossOrigin: 'anonymous',
|
||||||
maxZoom: providerConfig.maxZoom,
|
maxZoom: options.maxZoom != undefined ? options.maxZoom : providerConfig.maxZoom,
|
||||||
minZoom: providerConfig.minZoom,
|
minZoom: options.minZoom != undefined ? options.minZoom : providerConfig.minZoom,
|
||||||
opaque: layerConfig.opaque,
|
opaque: layerConfig.opaque,
|
||||||
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
|
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
|
||||||
tileLoadFunction: options.tileLoadFunction,
|
tileLoadFunction: options.tileLoadFunction,
|
||||||
|
|||||||
@@ -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