Changing bounds.transform so it works with non-conformal projections. r=ahocevar (closes #1407)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6421 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -459,12 +459,16 @@ OpenLayers.Bounds = OpenLayers.Class({
|
||||
transform: function(source, dest) {
|
||||
var ll = OpenLayers.Projection.transform(
|
||||
{'x': this.left, 'y': this.bottom}, source, dest);
|
||||
var lr = OpenLayers.Projection.transform(
|
||||
{'x': this.right, 'y': this.bottom}, source, dest);
|
||||
var ul = OpenLayers.Projection.transform(
|
||||
{'x': this.left, 'y': this.top}, source, dest);
|
||||
var ur = OpenLayers.Projection.transform(
|
||||
{'x': this.right, 'y': this.top}, source, dest);
|
||||
this.left = ll.x;
|
||||
this.bottom = ll.y;
|
||||
this.right = ur.x;
|
||||
this.top = ur.y;
|
||||
this.left = Math.min(ll.x, ul.x);
|
||||
this.bottom = Math.min(ll.y, lr.y);
|
||||
this.right = Math.max(lr.x, ur.x);
|
||||
this.top = Math.max(ul.y, ur.y);
|
||||
return this;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user