diff --git a/src/ol/Bounds.js b/src/ol/Bounds.js index 36b40e3086..3d77562522 100644 --- a/src/ol/Bounds.js +++ b/src/ol/Bounds.js @@ -53,7 +53,7 @@ ol.Bounds.prototype.setProjection = function(projection) { ol.Bounds.prototype.intersects = function(bounds) { var otherProj = bounds.getProjection(); if (!goog.isNull(otherProj) && !goog.isNull(this.projection_)) { - bounds = bounds.transform(this.projection_); + bounds = bounds.doTransform(this.projection_); } return goog.base(this, "intersects", bounds.toUnreferencedBounds()); }; @@ -70,13 +70,13 @@ ol.Bounds.prototype.doTransform = function(proj) { throw new Error("Bounds must have a projection before transforming."); } var tl = new ol.Loc( - this.minX_, this.maxY_, undefined, this.projection_).transform(proj); + this.minX_, this.maxY_, undefined, this.projection_).doTransform(proj); var tr = new ol.Loc( - this.maxX_, this.maxY_, undefined, this.projection_).transform(proj); + this.maxX_, this.maxY_, undefined, this.projection_).doTransform(proj); var bl = new ol.Loc( - this.minX_, this.minY_, undefined, this.projection_).transform(proj); + this.minX_, this.minY_, undefined, this.projection_).doTransform(proj); var br = new ol.Loc( - this.maxX_, this.minY_, undefined, this.projection_).transform(proj); + this.maxX_, this.minY_, undefined, this.projection_).doTransform(proj); var x = [tl.getX(), tr.getX(), bl.getX(), br.getX()].sort(); var y = [tl.getY(), tr.getY(), bl.getY(), br.getY()].sort(); diff --git a/src/ol/Map.js b/src/ol/Map.js index 125b12e776..5e9f3bcf7e 100644 --- a/src/ol/Map.js +++ b/src/ol/Map.js @@ -143,7 +143,7 @@ ol.Map.DEFAULT_CONTROLS = ["navigation"]; */ ol.Map.prototype.getCenter = function() { var proj = this.getUserProjection(); - return this.center_.transform(proj); + return this.center_.doTransform(proj); }; @@ -271,7 +271,7 @@ ol.Map.prototype.setCenter = function(center) { proj = this.getUserProjection(); center.setProjection(proj); } - this.center_ = center.transform(this.getProjection()); + this.center_ = center.doTransform(this.getProjection()); };