Use ol.source.Tile#getTileGridForProjection
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user