Skip to content

Commit

Permalink
Use ol.source.Tile#getTileGridForProjection
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Jan 15, 2014
1 parent 68b0f42 commit 091888a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
5 changes: 1 addition & 4 deletions src/ol/renderer/canvas/canvastilelayerrenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,7 @@ ol.renderer.canvas.TileLayer.prototype.prepareFrame =
goog.asserts.assertInstanceof(tileLayer, ol.layer.Tile);
var tileSource = tileLayer.getSource();
goog.asserts.assertInstanceof(tileSource, ol.source.Tile);
var tileGrid = tileSource.getTileGrid();
if (goog.isNull(tileGrid)) {
tileGrid = ol.tilegrid.getForProjection(projection);
}
var tileGrid = tileSource.getTileGridForProjection(projection);
var tileGutter = tileSource.getGutter();
var z = tileGrid.getZForResolution(view2DState.resolution);
var tileSize = tileGrid.getTileSize(z);
Expand Down
5 changes: 1 addition & 4 deletions src/ol/renderer/dom/domtilelayerrenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@ ol.renderer.dom.TileLayer.prototype.prepareFrame =
goog.asserts.assertInstanceof(tileLayer, ol.layer.Tile);
var tileSource = tileLayer.getSource();
goog.asserts.assertInstanceof(tileSource, ol.source.Tile);
var tileGrid = tileSource.getTileGrid();
if (goog.isNull(tileGrid)) {
tileGrid = ol.tilegrid.getForProjection(projection);
}
var tileGrid = tileSource.getTileGridForProjection(projection);
var tileGutter = tileSource.getGutter();
var z = tileGrid.getZForResolution(view2DState.resolution);
var tileResolution = tileGrid.getResolution(z);
Expand Down
5 changes: 1 addition & 4 deletions src/ol/renderer/webgl/webgltilelayerrenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,7 @@ ol.renderer.webgl.TileLayer.prototype.prepareFrame =
goog.asserts.assertInstanceof(tileLayer, ol.layer.Tile);
var tileSource = tileLayer.getSource();
goog.asserts.assertInstanceof(tileSource, ol.source.Tile);
var tileGrid = tileSource.getTileGrid();
if (goog.isNull(tileGrid)) {
tileGrid = ol.tilegrid.getForProjection(projection);
}
var tileGrid = tileSource.getTileGridForProjection(projection);
var z = tileGrid.getZForResolution(view2DState.resolution);
var tileResolution = tileGrid.getResolution(z);

Expand Down
2 changes: 1 addition & 1 deletion src/ol/source/tilewmssource.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ ol.source.TileWMS.prototype.tileUrlFunction_ =

var tileGrid = this.getTileGrid();
if (goog.isNull(tileGrid)) {
tileGrid = ol.tilegrid.getForProjection(projection);
tileGrid = this.getTileGridForProjection(projection);
}

if (tileGrid.getResolutions().length <= tileCoord.z) {
Expand Down

0 comments on commit 091888a

Please sign in to comment.