From 22ed575325287eba2796b1676471ea5216bbc876 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 4 Apr 2017 13:53:29 +0200 Subject: [PATCH] Add optional destination extent in ol.source.Vector#getExtent --- src/ol/source/vector.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ol/source/vector.js b/src/ol/source/vector.js index ee3c9ad205..78a0d5a338 100644 --- a/src/ol/source/vector.js +++ b/src/ol/source/vector.js @@ -610,11 +610,12 @@ ol.source.Vector.prototype.getClosestFeatureToCoordinate = function(coordinate, * * This method is not available when the source is configured with * `useSpatialIndex` set to `false`. + * @param {ol.Extent=} opt_extent Destination extent. * @return {!ol.Extent} Extent. * @api */ -ol.source.Vector.prototype.getExtent = function() { - return this.featuresRtree_.getExtent(); +ol.source.Vector.prototype.getExtent = function(opt_extent) { + return this.featuresRtree_.getExtent(opt_extent); };