Sort functions alphabetically

This commit is contained in:
Tom Payne
2012-07-08 12:44:47 +02:00
committed by Tom Payne
parent 40acb70a3c
commit 5494c36748
2 changed files with 49 additions and 49 deletions

View File

@@ -86,18 +86,18 @@ ol.TileGrid =
/**
* @return {boolean} X East.
* @param {ol.TileCoord} tileCoord Tile coordinate.
* @param {function(number, ol.TileBounds): boolean} callback Callback.
*/
ol.TileGrid.prototype.getXEast = function() {
return this.xEast_;
};
/**
* @return {boolean} Y South.
*/
ol.TileGrid.prototype.getYSouth = function() {
return this.ySouth_;
ol.TileGrid.prototype.forEachTileCoordParent = function(tileCoord, callback) {
var tileCoordExtent = this.getTileCoordExtent(tileCoord);
var z = tileCoord.z - 1;
while (z >= 0) {
if (callback(z, this.getExtentTileBounds(z, tileCoordExtent))) {
return;
}
--z;
}
};
@@ -109,6 +109,20 @@ ol.TileGrid.prototype.getExtent = function() {
};
/**
* @param {number} z Z.
* @param {ol.Extent} extent Extent.
* @return {ol.TileBounds} Tile bounds.
*/
ol.TileGrid.prototype.getExtentTileBounds = function(z, extent) {
var topRight = new goog.math.Coordinate(extent.right, extent.top);
var bottomLeft = new goog.math.Coordinate(extent.left, extent.bottom);
return ol.TileBounds.boundingTileBounds(
this.getTileCoord(z, topRight),
this.getTileCoord(z, bottomLeft));
};
/**
* @return {number} Maximum resolution.
*/
@@ -150,20 +164,6 @@ ol.TileGrid.prototype.getResolutions = function() {
};
/**
* @param {number} z Z.
* @param {ol.Extent} extent Extent.
* @return {ol.TileBounds} Tile bounds.
*/
ol.TileGrid.prototype.getExtentTileBounds = function(z, extent) {
var topRight = new goog.math.Coordinate(extent.right, extent.top);
var bottomLeft = new goog.math.Coordinate(extent.left, extent.bottom);
return ol.TileBounds.boundingTileBounds(
this.getTileCoord(z, topRight),
this.getTileCoord(z, bottomLeft));
};
/**
* @param {number} z Z.
* @param {goog.math.Coordinate} coordinate Coordinate.
@@ -241,6 +241,16 @@ ol.TileGrid.prototype.getTileCoordExtent = function(tileCoord) {
};
/**
* @param {ol.TileCoord} tileCoord Tile coordinate.
* @return {number} Tile resolution.
*/
ol.TileGrid.prototype.getTileCoordResolution = function(tileCoord) {
goog.asserts.assert(0 <= tileCoord.z && tileCoord.z < this.numResolutions_);
return this.resolutions_[tileCoord.z];
};
/**
* @return {goog.math.Size} Tile size.
*/
@@ -250,12 +260,18 @@ ol.TileGrid.prototype.getTileSize = function() {
/**
* @param {ol.TileCoord} tileCoord Tile coordinate.
* @return {number} Tile resolution.
* @return {boolean} X East.
*/
ol.TileGrid.prototype.getTileCoordResolution = function(tileCoord) {
goog.asserts.assert(0 <= tileCoord.z && tileCoord.z < this.numResolutions_);
return this.resolutions_[tileCoord.z];
ol.TileGrid.prototype.getXEast = function() {
return this.xEast_;
};
/**
* @return {boolean} Y South.
*/
ol.TileGrid.prototype.getYSouth = function() {
return this.ySouth_;
};
@@ -281,19 +297,3 @@ ol.TileGrid.prototype.getZForResolution = function(resolution) {
}
return this.numResolutions_ - 1;
};
/**
* @param {ol.TileCoord} tileCoord Tile coordinate.
* @param {function(number, ol.TileBounds): boolean} callback Callback.
*/
ol.TileGrid.prototype.forEachTileCoordParent = function(tileCoord, callback) {
var tileCoordExtent = this.getTileCoordExtent(tileCoord);
var z = tileCoord.z - 1;
while (z >= 0) {
if (callback(z, this.getExtentTileBounds(z, tileCoordExtent))) {
return;
}
--z;
}
};