Tests for the getTileData method.

Tests pass on Chrome 17, Firefox 10, IE 8, and IE 6.
This commit is contained in:
Tim Schaub
2012-03-08 19:16:09 -06:00
parent 46054b8543
commit 021ad521a8
2 changed files with 127 additions and 1 deletions

View File

@@ -460,7 +460,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
// index of tile in grid
var col = Math.floor(dtx);
var row = Math.floor(dty);
if (row < numRows) {
if (row >= 0 && row < numRows) {
var tile = this.grid[row][col];
if (tile) {
data = {