Bind tileUrlFunction before returning it from getTileUrlFunction

This commit is contained in:
Andreas Hocevar
2020-09-10 10:10:52 +02:00
parent 0ec6674465
commit bff25f9ba4
2 changed files with 13 additions and 2 deletions

View File

@@ -159,6 +159,15 @@ describe('ol.source.TileWMS', function () {
});
describe('#tileUrlFunction', function () {
it('can be used when obtained through #getTileUrlFunction', function () {
options.extent = [-80, -40, -50, -10];
const source = new TileWMS(options);
const tileCoord = [3, 2, 2];
expect(function () {
source.getTileUrlFunction()(tileCoord, 1, getProjection('EPSG:4326'));
}).to.not.throwException();
});
it('returns a tile if it is contained within layers extent', function () {
options.extent = [-80, -40, -50, -10];
const source = new TileWMS(options);