Add ol.Extent.get{Bottom,Top}{Left,Right}
This commit is contained in:
@@ -50,6 +50,38 @@ ol.Extent.prototype.contains = function(coordinate) {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.Coordinate} Bottom left coordinate.
|
||||
*/
|
||||
ol.Extent.prototype.getBottomLeft = function() {
|
||||
return new ol.Coordinate(this.minX, this.minY);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.Coordinate} Bottom right coordinate.
|
||||
*/
|
||||
ol.Extent.prototype.getBottomRight = function() {
|
||||
return new ol.Coordinate(this.maxX, this.minY);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.Coordinate} Top left coordinate.
|
||||
*/
|
||||
ol.Extent.prototype.getTopLeft = function() {
|
||||
return new ol.Coordinate(this.minX, this.maxY);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.Coordinate} Top right coordinate.
|
||||
*/
|
||||
ol.Extent.prototype.getTopRight = function() {
|
||||
return new ol.Coordinate(this.maxX, this.maxY);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.TransformFunction} transformFn Transform function.
|
||||
* @return {ol.Extent} Extent.
|
||||
|
||||
Reference in New Issue
Block a user