Add ol.source.Tile#getTileGridForProjection
This commit is contained in:
@@ -159,6 +159,18 @@ ol.source.Tile.prototype.getTileGrid = function() {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.proj.Projection} projection Projection.
|
||||
* @return {ol.tilegrid.TileGrid} Tile grid.
|
||||
*/
|
||||
ol.source.Tile.prototype.getTileGridForProjection = function(projection) {
|
||||
if (goog.isNull(this.tileGrid)) {
|
||||
return ol.tilegrid.getForProjection(projection);
|
||||
} else {
|
||||
return this.tileGrid;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Marks a tile coord as being used, without triggering a load.
|
||||
* @param {number} z Tile coordinate z.
|
||||
|
||||
Reference in New Issue
Block a user