diff --git a/lib/OpenLayers/BaseTypes/Bounds.js b/lib/OpenLayers/BaseTypes/Bounds.js index 32493f85c9..0a739f1cc3 100644 --- a/lib/OpenLayers/BaseTypes/Bounds.js +++ b/lib/OpenLayers/BaseTypes/Bounds.js @@ -121,11 +121,9 @@ OpenLayers.Bounds = OpenLayers.Class({ * * Returns: * {String} String representation of bounds object. - * (ex."left-bottom=(5,42) right-top=(10,45)") */ toString:function() { - return ( "left-bottom=(" + this.left + "," + this.bottom + ")" - + " right-top=(" + this.right + "," + this.top + ")" ); + return [this.left, this.bottom, this.right, this.top].join(","); }, /** diff --git a/tests/BaseTypes/Bounds.html b/tests/BaseTypes/Bounds.html index abbba01b61..f5620af87b 100644 --- a/tests/BaseTypes/Bounds.html +++ b/tests/BaseTypes/Bounds.html @@ -76,7 +76,7 @@ function test_Bounds_toString(t) { t.plan( 1 ); bounds = new OpenLayers.Bounds(1,2,3,4); - t.eq( bounds.toString(), "left-bottom=(1,2) right-top=(3,4)", "toString() returns correct value." ); + t.eq( bounds.toString(), "1,2,3,4", "toString() returns correct value." ); } function test_Bounds_toArray(t) { t.plan( 1 );