Use a common origin and resolution factors for tile alignment

This commit is contained in:
Andreas Hocevar
2016-09-16 14:40:01 +02:00
parent 004afa6b9a
commit f23921367b
2 changed files with 37 additions and 8 deletions

View File

@@ -40,6 +40,14 @@ describe('ol.renderer.canvas.TileLayer', function() {
canvas: canvas,
drawImage: sinon.spy()
};
renderer.renderedTiles = [{
getTileCoord: function() {
return [0, 0, 0];
},
getImage: function() {
return new Image();
}
}];
renderer.composeFrame(frameState, layerState, context);
expect(context.drawImage.firstCall.args[0].width).to.be(112);
});