Compute new image extent for comparison to existing image extent

This commit is contained in:
rattai
2015-08-04 17:25:47 -04:00
parent 85815a32a0
commit b3f14f09c4
2 changed files with 26 additions and 18 deletions

View File

@@ -155,6 +155,14 @@ describe('ol.source.ImageWMS', function() {
expect(imageLoadFunction.calledWith(image, image.src_)).to.be(true);
});
it('returns the same image for consecutive calls with the same args', function() {
var extent = [10.01, 20, 30.01, 40];
var source = new ol.source.ImageWMS(options);
var image1 = source.getImage(extent, resolution, pixelRatio, projection);
var image2 = source.getImage(extent, resolution, pixelRatio, projection);
expect(image1).to.equal(image2);
});
});
describe('#getGetFeatureInfo', function() {