From f435bb18743f403e32dbf1c549a67ac6b01d722d Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Tue, 19 Jun 2012 13:00:24 +0200 Subject: [PATCH] Bounds fixes. --- src/api/bounds.js | 7 +------ src/ol/Bounds.js | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/api/bounds.js b/src/api/bounds.js index 4b520fa390..129035c86a 100644 --- a/src/api/bounds.js +++ b/src/api/bounds.js @@ -44,12 +44,7 @@ ol.bounds = function(opt_arg){ throw new Error('ol.bounds'); } - var bounds = new ol.Bounds(); - bounds.setMinX(minX); - bounds.setMinY(minY); - bounds.setMaxX(maxX); - bounds.setMaxY(maxY); - bounds.setProjection(projection); + var bounds = new ol.Bounds(minX, minY, maxX, maxY, projection); return bounds; }; diff --git a/src/ol/Bounds.js b/src/ol/Bounds.js index 0b8e99179e..0b9d7ddf9d 100644 --- a/src/ol/Bounds.js +++ b/src/ol/Bounds.js @@ -30,13 +30,13 @@ ol.Bounds = function(minX, minY, maxX, maxY, opt_projection) { * @private * @type {number} */ - this.minX_ = minX; + this.maxX_ = maxX; /** * @private * @type {number} */ - this.minY_ = minY; + this.maxY_ = maxY; /** * @private