s/getTileBounds/getExtentTileBounds/

This commit is contained in:
Tom Payne
2012-07-07 13:27:19 +02:00
committed by Tom Payne
parent 656974090f
commit 4ff6f03834
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -170,7 +170,7 @@ TileGrid
corner TOP_LEFT | BOTTOM_LEFT corner TOP_LEFT | BOTTOM_LEFT
origin(s) Coord|Array.<Coord> origin(s) Coord|Array.<Coord>
tileSize goog.math.Size tileSize goog.math.Size
getTileBounds(z, extent) -> TileBounds getExtentTileBounds(z, extent) -> TileBounds
getTileCoordCenter(tileCoord) -> goog.math.Coordinate getTileCoordCenter(tileCoord) -> goog.math.Coordinate
getTileCoord(coordinate) -> TileCoord getTileCoord(coordinate) -> TileCoord
getTileCoordExtent(tileCoord) -> ol.Extent getTileCoordExtent(tileCoord) -> ol.Extent
+3 -3
View File
@@ -134,7 +134,7 @@ ol.TileGrid.prototype.getResolutions = function() {
* @param {ol.Extent} extent Extent. * @param {ol.Extent} extent Extent.
* @return {ol.TileBounds} Tile bounds. * @return {ol.TileBounds} Tile bounds.
*/ */
ol.TileGrid.prototype.getTileBounds = function(z, extent) { ol.TileGrid.prototype.getExtentTileBounds = function(z, extent) {
var topRight = new goog.math.Coordinate(extent.right, extent.top); var topRight = new goog.math.Coordinate(extent.right, extent.top);
var bottomLeft = new goog.math.Coordinate(extent.left, extent.bottom); var bottomLeft = new goog.math.Coordinate(extent.left, extent.bottom);
return ol.TileBounds.boundingTileBounds( return ol.TileBounds.boundingTileBounds(
@@ -235,10 +235,10 @@ ol.TileGrid.prototype.getTileResolution = function(tileCoord) {
* @param {function(number, ol.TileBounds): boolean} callback Callback. * @param {function(number, ol.TileBounds): boolean} callback Callback.
*/ */
ol.TileGrid.prototype.yieldTileCoordParents = function(tileCoord, callback) { ol.TileGrid.prototype.yieldTileCoordParents = function(tileCoord, callback) {
var extent = this.getTileCoordExtent(tileCoord); var tileCoordExtent = this.getTileCoordExtent(tileCoord);
var z = tileCoord.z - 1; var z = tileCoord.z - 1;
while (z >= 0) { while (z >= 0) {
if (callback(z, this.getTileBounds(z, extent))) { if (callback(z, this.getExtentTileBounds(z, tileCoordExtent))) {
return; return;
} }
--z; --z;