Sort functions alphabetically
This commit is contained in:
@@ -175,14 +175,14 @@ TileGrid
|
||||
ySouth boolean
|
||||
origin(s) Coord|Array.<Coord>
|
||||
tileSize goog.math.Size
|
||||
forEachTileCoordChild(tileCoord, function(z, TileBounds))
|
||||
forEachTileCoordParent(tileCoord, function(z, TileBounds))
|
||||
getExtentTileBounds(z, extent) -> TileBounds
|
||||
getTileCoordCenter(tileCoord) -> goog.math.Coordinate
|
||||
getTileCoord(coordinate) -> TileCoord
|
||||
getTileCoordCenter(tileCoord) -> goog.math.Coordinate
|
||||
getTileCoordExtent(tileCoord) -> ol.Extent
|
||||
getTileCoordResolution(tileCoord) -> number
|
||||
getZForResolution(resolution) -> number
|
||||
forEachTileCoordChild(tileCoord, function(z, TileBounds))
|
||||
forEachTileCoordParent(tileCoord, function(z, TileBounds))
|
||||
|
||||
TileLayer
|
||||
tileGrid TileGrid
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user