Do not pass tile grid to getTile and tileUrlFunc

getTile and the tileUrlFunc are functions of the source, so they do need to be passed the tile grid. The tile source knows its tile grid, and can get the projection's tile grid if it doesn't have a tile grid.
This commit is contained in:
Éric Lemoine
2013-04-02 11:00:39 +02:00
parent 676bcc6cc7
commit e128bab625
12 changed files with 54 additions and 48 deletions

View File

@@ -205,7 +205,7 @@ ol.renderer.webgl.TileLayer.prototype.renderFrame =
var getTileIfLoaded = this.createGetTileIfLoadedFunction(function(tile) {
return !goog.isNull(tile) && tile.getState() == ol.TileState.LOADED &&
mapRenderer.isTileTextureLoaded(tile);
}, tileSource, tileGrid, projection);
}, tileSource, projection);
var findLoadedTiles = goog.bind(tileSource.findLoadedTiles, tileSource,
tilesToDrawByZ, getTileIfLoaded);
@@ -214,7 +214,7 @@ ol.renderer.webgl.TileLayer.prototype.renderFrame =
for (x = tileRange.minX; x <= tileRange.maxX; ++x) {
for (y = tileRange.minY; y <= tileRange.maxY; ++y) {
tile = tileSource.getTile(z, x, y, tileGrid, projection);
tile = tileSource.getTile(z, x, y, projection);
tileState = tile.getState();
if (tileState == ol.TileState.LOADED) {
if (mapRenderer.isTileTextureLoaded(tile)) {