Explicit data tile size

This commit is contained in:
Tim Schaub
2022-05-06 12:32:48 -06:00
parent b29ad01c7a
commit 38b48bd341
13 changed files with 260 additions and 59 deletions
+22
View File
@@ -33,6 +33,28 @@ describe('ol/DataTile', function () {
});
});
describe('#getSize()', function () {
it('returns [256, 256] by default', function () {
const tileCoord = [0, 0, 0];
const tile = new DataTile({
tileCoord: tileCoord,
loader: loader,
});
expect(tile.getSize()).to.eql([256, 256]);
});
it('respects what is provided in the constructor', function () {
const size = [123, 456];
const tileCoord = [0, 0, 0];
const tile = new DataTile({
size: size,
tileCoord: tileCoord,
loader: loader,
});
expect(tile.getSize()).to.eql(size);
});
});
describe('#load()', function () {
it('handles loading states correctly', function (done) {
const tileCoord = [0, 0, 0];