Add ol.extent.getArea
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user