Add geom.ol.geom.Geometry#computeExtent function

This commit is contained in:
Frederic Junod
2015-01-08 11:38:20 +01:00
parent 35468e2bbb
commit 8bd0a1232a
5 changed files with 37 additions and 50 deletions
+2 -8
View File
@@ -73,14 +73,8 @@ ol.geom.Point.prototype.getCoordinates = function() {
/**
* @inheritDoc
*/
ol.geom.Point.prototype.getExtent = function(opt_extent) {
if (this.extentRevision != this.getRevision()) {
this.extent = ol.extent.createOrUpdateFromCoordinate(
this.flatCoordinates, this.extent);
this.extentRevision = this.getRevision();
}
goog.asserts.assert(goog.isDef(this.extent));
return ol.extent.returnOrUpdate(this.extent, opt_extent);
ol.geom.Point.prototype.computeExtent = function(extent) {
return ol.extent.createOrUpdateFromCoordinate(this.flatCoordinates, extent);
};