Merge pull request #5725 from probins/wmts

Remove tilerange assert from tilegrid/wmts
This commit is contained in:
Andreas Hocevar
2016-08-15 09:46:31 +02:00
committed by GitHub
3 changed files with 0 additions and 31 deletions

View File

@@ -85,10 +85,6 @@ Number of `tileSizes` and `resolutions` must be equal.
Number of `origins` and `resolutions` must be equal.
### 21
Tile range for `extent` must not exceed tilegrid width and height.
### 22
Either `tileSize` or `tileSizes` must be configured, never both.

View File

@@ -122,11 +122,6 @@ ol.tilegrid.TileGrid = function(options) {
var tileRange = new ol.TileRange(
Math.min(0, size[0]), Math.max(size[0] - 1, -1),
Math.min(0, size[1]), Math.max(size[1] - 1, -1));
if (this.minZoom <= z && z <= this.maxZoom && extent !== undefined) {
ol.asserts.assert(tileRange.containsTileRange(
this.getTileRangeForExtentAndZ(extent, z)),
21); // Tile range for `extent` must not exceed tilegrid width and height
}
return tileRange;
}, this);
} else if (extent) {

View File

@@ -159,28 +159,6 @@ describe('ol.tilegrid.TileGrid', function() {
});
});
describe('create with extent exceeding tile ranges', function() {
it('throws an exception', function() {
expect(function() {
return new ol.tilegrid.TileGrid({
extent: [10, 20, 30, 40],
sizes: [[1, 1]],
tileSize: 10,
resolutions: [1]
});
}).to.throwException();
expect(function() {
return new ol.tilegrid.TileGrid({
extent: [10, 20, 30, 40],
origin: [10, 40], // top-left origin
sizes: [[3, 3]], // would have to be [[3, -3]] for this to not throw
tileSize: 10,
resolutions: [1]
});
}).to.throwException();
});
});
describe('create with origin', function() {
var tileGrid;
beforeEach(function() {