Sort functions alphabetically
This commit is contained in:
+3
-3
@@ -175,14 +175,14 @@ TileGrid
|
|||||||
ySouth boolean
|
ySouth boolean
|
||||||
origin(s) Coord|Array.<Coord>
|
origin(s) Coord|Array.<Coord>
|
||||||
tileSize goog.math.Size
|
tileSize goog.math.Size
|
||||||
|
forEachTileCoordChild(tileCoord, function(z, TileBounds))
|
||||||
|
forEachTileCoordParent(tileCoord, function(z, TileBounds))
|
||||||
getExtentTileBounds(z, extent) -> TileBounds
|
getExtentTileBounds(z, extent) -> TileBounds
|
||||||
getTileCoordCenter(tileCoord) -> goog.math.Coordinate
|
|
||||||
getTileCoord(coordinate) -> TileCoord
|
getTileCoord(coordinate) -> TileCoord
|
||||||
|
getTileCoordCenter(tileCoord) -> goog.math.Coordinate
|
||||||
getTileCoordExtent(tileCoord) -> ol.Extent
|
getTileCoordExtent(tileCoord) -> ol.Extent
|
||||||
getTileCoordResolution(tileCoord) -> number
|
getTileCoordResolution(tileCoord) -> number
|
||||||
getZForResolution(resolution) -> number
|
getZForResolution(resolution) -> number
|
||||||
forEachTileCoordChild(tileCoord, function(z, TileBounds))
|
|
||||||
forEachTileCoordParent(tileCoord, function(z, TileBounds))
|
|
||||||
|
|
||||||
TileLayer
|
TileLayer
|
||||||
tileGrid TileGrid
|
tileGrid TileGrid
|
||||||
|
|||||||
+46
-46
@@ -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() {
|
ol.TileGrid.prototype.forEachTileCoordParent = function(tileCoord, callback) {
|
||||||
return this.xEast_;
|
var tileCoordExtent = this.getTileCoordExtent(tileCoord);
|
||||||
};
|
var z = tileCoord.z - 1;
|
||||||
|
while (z >= 0) {
|
||||||
|
if (callback(z, this.getExtentTileBounds(z, tileCoordExtent))) {
|
||||||
/**
|
return;
|
||||||
* @return {boolean} Y South.
|
}
|
||||||
*/
|
--z;
|
||||||
ol.TileGrid.prototype.getYSouth = function() {
|
}
|
||||||
return this.ySouth_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -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.
|
* @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 {number} z Z.
|
||||||
* @param {goog.math.Coordinate} coordinate Coordinate.
|
* @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.
|
* @return {goog.math.Size} Tile size.
|
||||||
*/
|
*/
|
||||||
@@ -250,12 +260,18 @@ ol.TileGrid.prototype.getTileSize = function() {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.TileCoord} tileCoord Tile coordinate.
|
* @return {boolean} X East.
|
||||||
* @return {number} Tile resolution.
|
|
||||||
*/
|
*/
|
||||||
ol.TileGrid.prototype.getTileCoordResolution = function(tileCoord) {
|
ol.TileGrid.prototype.getXEast = function() {
|
||||||
goog.asserts.assert(0 <= tileCoord.z && tileCoord.z < this.numResolutions_);
|
return this.xEast_;
|
||||||
return this.resolutions_[tileCoord.z];
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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;
|
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