From c2b1a94298aba221ec5ef3c29facc87d8ab7f613 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Sat, 4 Aug 2012 18:46:54 +0200 Subject: [PATCH] Don't re-use ol.TileCoord object --- src/ol/tile/tilebounds.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/ol/tile/tilebounds.js b/src/ol/tile/tilebounds.js index 4c139d2026..7a637a7d62 100644 --- a/src/ol/tile/tilebounds.js +++ b/src/ol/tile/tilebounds.js @@ -86,16 +86,10 @@ ol.TileBounds.prototype.equals = function(tileBounds) { * @template T */ ol.TileBounds.prototype.forEachTileCoord = function(z, f, opt_obj) { - var tileCoord = new ol.TileCoord(z, 0, 0); var x, y; for (x = this.minX; x <= this.maxX; ++x) { - tileCoord.x = x; for (y = this.minY; y <= this.maxY; ++y) { - tileCoord.y = y; - f.call(opt_obj, tileCoord); - goog.asserts.assert(tileCoord.z == z); - goog.asserts.assert(tileCoord.x == x); - goog.asserts.assert(tileCoord.y == y); + f.call(opt_obj, new ol.TileCoord(z, x, y)); } } };