Return null tiles when out of range

This commit is contained in:
Tom Payne
2012-07-15 22:22:25 +02:00
parent bf31b614e8
commit 8df2404e77
2 changed files with 8 additions and 2 deletions

View File

@@ -210,7 +210,8 @@ ol.webgl.TileLayerRenderer.prototype.redraw = function() {
tileBounds.forEachTileCoord(z, function(tileCoord) {
var tile = tileStore.getTile(tileCoord);
if (tile.isLoaded()) {
if (goog.isNull(tile)) {
} else if (tile.isLoaded()) {
var x = tileSize.width * (tileCoord.x - tileBounds.minX);
var y = tileSize.height * (tileCoord.y - tileBounds.minY);
gl.texSubImage2D(goog.webgl.TEXTURE_2D, 0,