Add ol.TileBounds.getSize

This commit is contained in:
Tom Payne
2012-07-17 16:06:10 +02:00
parent b4fea2233e
commit aded70d6e6
2 changed files with 18 additions and 0 deletions
+10
View File
@@ -1,6 +1,7 @@
goog.provide('ol.TileBounds');
goog.require('goog.asserts');
goog.require('goog.math.Size');
goog.require('ol.Rectangle');
goog.require('ol.TileCoord');
@@ -71,3 +72,12 @@ ol.TileBounds.prototype.forEachTileCoord = function(z, f, opt_obj) {
}
}
};
/**
* @return {goog.math.Size} Size.
*/
ol.TileBounds.prototype.getSize = function() {
return new goog.math.Size(
this.maxX - this.minX + 1, this.maxY - this.minY + 1);
};