Add ol.extent.getMargin

This commit is contained in:
Tom Payne
2013-11-24 14:15:56 +01:00
parent 8c6e5287b5
commit 7967edb8f0

View File

@@ -423,6 +423,15 @@ ol.extent.getIntersectionArea = function(extent1, extent2) {
};
/**
* @param {ol.Extent} extent Extent.
* @return {number} Margin.
*/
ol.extent.getMargin = function(extent) {
return ol.extent.getWidth(extent) + ol.extent.getHeight(extent);
};
/**
* @param {ol.Extent} extent Extent.
* @return {ol.Size} Size.