Top should always be greater than or equal to bottom in ol.TileBounds
This commit is contained in:
@@ -16,6 +16,9 @@ goog.require('ol.TileCoord');
|
|||||||
*/
|
*/
|
||||||
ol.TileBounds = function(top, right, bottom, left) {
|
ol.TileBounds = function(top, right, bottom, left) {
|
||||||
|
|
||||||
|
goog.asserts.assert(top <= bottom);
|
||||||
|
goog.asserts.assert(left <= right);
|
||||||
|
|
||||||
goog.base(this, top, right, bottom, left);
|
goog.base(this, top, right, bottom, left);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -214,9 +214,9 @@ function testGetExtentTileBounds() {
|
|||||||
|
|
||||||
tileBounds = tileGrid.getExtentTileBounds(3, e);
|
tileBounds = tileGrid.getExtentTileBounds(3, e);
|
||||||
window.console.log(tileBounds);
|
window.console.log(tileBounds);
|
||||||
assertEquals(9, tileBounds.top);
|
assertEquals(8, tileBounds.top);
|
||||||
assertEquals(5, tileBounds.right);
|
assertEquals(5, tileBounds.right);
|
||||||
assertEquals(8, tileBounds.bottom);
|
assertEquals(9, tileBounds.bottom);
|
||||||
assertEquals(4, tileBounds.left);
|
assertEquals(4, tileBounds.left);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user