Use standard tile coords

This commit is contained in:
Tim Schaub
2018-11-20 15:28:24 -07:00
parent 37c987de0a
commit e9a30c5cb7
29 changed files with 241 additions and 229 deletions
+4 -4
View File
@@ -198,7 +198,7 @@ describe('ol.source.WMTS', function() {
const projection = getProjection('EPSG:3857');
const url = source.tileUrlFunction(
source.getTileCoordForTileUrlFunction([1, 1, -2]), 1, projection);
source.getTileCoordForTileUrlFunction([1, 1, 1]), 1, projection);
expect(url).to.be.eql('http://host/layer/default/EPSG:3857/1/1/1.jpg');
});
@@ -215,7 +215,7 @@ describe('ol.source.WMTS', function() {
const projection = getProjection('EPSG:3857');
const url = source.tileUrlFunction(
source.getTileCoordForTileUrlFunction([1, 1, -2]), 1, projection);
source.getTileCoordForTileUrlFunction([1, 1, 1]), 1, projection);
expect(url).to.be.eql('http://host/layer/default/EPSG:3857/1/1/1.jpg');
});
@@ -233,7 +233,7 @@ describe('ol.source.WMTS', function() {
const projection = getProjection('EPSG:3857');
const url = source.tileUrlFunction(
source.getTileCoordForTileUrlFunction([1, 1, -2]), 1, projection);
source.getTileCoordForTileUrlFunction([1, 1, 1]), 1, projection);
expect(url).to.be.eql('http://host/layer/default/42/EPSG:3857/1/1/1.jpg');
});
});
@@ -334,7 +334,7 @@ describe('ol.source.WMTS', function() {
'https://b.example.com/{TileMatrix}/{TileRow}/{TileCol}.jpg'
];
source.setUrls(urls);
const tileUrl1 = source.tileUrlFunction([2, 9, 4], 1, projection);
const tileUrl1 = source.tileUrlFunction([2, 9, -5], 1, projection);
expect(tileUrl1).to.match(/https\:\/\/[ab]\.example\.com\/2\/-5\/9\.jpg/);
});
});