reinsertion of r1572

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1607 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-10-05 20:01:09 +00:00
parent 2b7c6cc844
commit 6366edc515

View File

@@ -367,21 +367,24 @@ OpenLayers.Bounds.prototype = {
},
/**
* @return Simple String representation of OpenLayers.Bounds object.
* (ex. <i>"5,42,10,45"</i>)
* @type String
*/
toBBOX:function(power) {
var mult;
if (power) {
mult = Math.pow(10,power);
} else {
mult = Math.pow(10,6);
}
return (Math.round(this.left*mult)/mult + "," +
Math.round(this.bottom*mult)/mult + "," +
Math.round(this.right*mult)/mult + "," +
Math.round(this.top*mult)/mult);
* @param {int} decimal How many significant digits in the bbox coords?
* Default is 6
*
* @returns Simple String representation of OpenLayers.Bounds object.
* (ex. <i>"5,42,10,45"</i>)
* @type String
*/
toBBOX:function(decimal) {
if (decimal== null) {
decimal = 6;
}
var mult = Math.pow(10, decimal);
var bbox = Math.round(this.left * mult) / mult + "," +
Math.round(this.bottom * mult) / mult + "," +
Math.round(this.right * mult) / mult + "," +
Math.round(this.top * mult) / mult;
return bbox;
},
/**