Add ol.extent.getArea

This commit is contained in:
Tom Payne
2013-11-24 14:14:50 +01:00
parent b99fac9901
commit 0294691446

View File

@@ -316,6 +316,15 @@ ol.extent.extendXY = function(extent, x, y) {
};
/**
* @param {ol.Extent} extent Extent.
* @return {number} Area.
*/
ol.extent.getArea = function(extent) {
return ol.extent.getWidth(extent) * ol.extent.getHeight(extent);
};
/**
* @param {ol.Extent} extent Extent.
* @return {ol.Coordinate} Bottom left coordinate.