Check view extent within image extent

This commit is contained in:
Andreas Hocevar
2015-10-28 23:58:00 +01:00
parent 6d9dd030a1
commit 40c1a6d112
2 changed files with 19 additions and 8 deletions

View File

@@ -163,6 +163,16 @@ describe('ol.source.ImageWMS', function() {
expect(image1).to.equal(image2);
});
it('returns same image for calls with similar extents', function() {
options.ratio = 1.5;
var source = new ol.source.ImageWMS(options);
var extent = [10.01, 20, 30.01, 40];
var image1 = source.getImage(extent, resolution, pixelRatio, projection);
extent = [10.01, 20.1, 30.01, 40.1];
var image2 = source.getImage(extent, resolution, pixelRatio, projection);
expect(image1).to.equal(image2);
});
});
describe('#getGetFeatureInfo', function() {