Top should always be greater than or equal to bottom in ol.TileBounds

This commit is contained in:
Tom Payne
2012-07-07 13:42:58 +02:00
committed by Tom Payne
parent 9a89814896
commit 85716afa38
2 changed files with 5 additions and 2 deletions

View File

@@ -16,6 +16,9 @@ goog.require('ol.TileCoord');
*/
ol.TileBounds = function(top, right, bottom, left) {
goog.asserts.assert(top <= bottom);
goog.asserts.assert(left <= right);
goog.base(this, top, right, bottom, left);
};

View File

@@ -214,9 +214,9 @@ function testGetExtentTileBounds() {
tileBounds = tileGrid.getExtentTileBounds(3, e);
window.console.log(tileBounds);
assertEquals(9, tileBounds.top);
assertEquals(8, tileBounds.top);
assertEquals(5, tileBounds.right);
assertEquals(8, tileBounds.bottom);
assertEquals(9, tileBounds.bottom);
assertEquals(4, tileBounds.left);
}