From c82bacb762e54c335c977af8734b2847ec1a1da6 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Sun, 22 Jul 2012 02:50:12 +0200 Subject: [PATCH] Add ol.TileBounds.equals --- src/ol/tilebounds.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ol/tilebounds.js b/src/ol/tilebounds.js index ace41a050a..133f62117c 100644 --- a/src/ol/tilebounds.js +++ b/src/ol/tilebounds.js @@ -59,6 +59,16 @@ ol.TileBounds.prototype.contains = function(tileBounds) { }; +/** + * @param {ol.TileBounds} tileBounds Tile bounds. + * @return {boolean} Equals. + */ +ol.TileBounds.prototype.equals = function(tileBounds) { + return this.minX == tileBounds.minX && tileBounds.maxX == this.maxX && + this.minY == tileBounds.minY && tileBounds.minY == this.minY; +}; + + /** * @param {number} z Z. * @param {function(this: T, ol.TileCoord)} f Callback.