s/yield/forEach/
This commit is contained in:
+3
-3
@@ -179,8 +179,8 @@ TileGrid
|
|||||||
getTileCoord(coordinate) -> TileCoord
|
getTileCoord(coordinate) -> TileCoord
|
||||||
getTileCoordExtent(tileCoord) -> ol.Extent
|
getTileCoordExtent(tileCoord) -> ol.Extent
|
||||||
getZForResolution(resolution) -> number
|
getZForResolution(resolution) -> number
|
||||||
yieldTileCoordChildren(tileCoord, function(z, TileBounds))
|
forEachTileCoordChild(tileCoord, function(z, TileBounds))
|
||||||
yieldTileCoordParents(tileCoord, function(z, TileBounds))
|
forEachTileCoordParent(tileCoord, function(z, TileBounds))
|
||||||
|
|
||||||
TileLayer
|
TileLayer
|
||||||
tileGrid TileGrid
|
tileGrid TileGrid
|
||||||
@@ -193,7 +193,7 @@ TileQueue
|
|||||||
enqueueTile(Tile)
|
enqueueTile(Tile)
|
||||||
|
|
||||||
VectorLayer
|
VectorLayer
|
||||||
yieldFeatures(resolution, extent, projection, function(Feature))
|
forEachFeature(resolution, extent, projection, function(Feature))
|
||||||
|
|
||||||
Renderer
|
Renderer
|
||||||
target HTMLDivElement
|
target HTMLDivElement
|
||||||
|
|||||||
+1
-1
@@ -239,7 +239,7 @@ ol.TileGrid.prototype.getTileResolution = function(tileCoord) {
|
|||||||
* @param {ol.TileCoord} tileCoord Tile coordinate.
|
* @param {ol.TileCoord} tileCoord Tile coordinate.
|
||||||
* @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.forEachTileCoordParent = function(tileCoord, callback) {
|
||||||
var tileCoordExtent = this.getTileCoordExtent(tileCoord);
|
var tileCoordExtent = this.getTileCoordExtent(tileCoord);
|
||||||
var z = tileCoord.z - 1;
|
var z = tileCoord.z - 1;
|
||||||
while (z >= 0) {
|
while (z >= 0) {
|
||||||
|
|||||||
@@ -222,13 +222,13 @@ function testGetExtentTileBounds() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function testYieldTileCoordParents() {
|
function testForEachTileCoordParent() {
|
||||||
|
|
||||||
var tileGrid =
|
var tileGrid =
|
||||||
new ol.TileGrid(resolutions, extent, corner, origin, tileSize);
|
new ol.TileGrid(resolutions, extent, corner, origin, tileSize);
|
||||||
var zs = [], tileBoundss = [];
|
var zs = [], tileBoundss = [];
|
||||||
|
|
||||||
tileGrid.yieldTileCoordParents(
|
tileGrid.forEachTileCoordParent(
|
||||||
new ol.TileCoord(3, 7, 3),
|
new ol.TileCoord(3, 7, 3),
|
||||||
function(z, tileBounds) {
|
function(z, tileBounds) {
|
||||||
zs.push(z);
|
zs.push(z);
|
||||||
|
|||||||
Reference in New Issue
Block a user