minor update to r1558 for coding standards, comments, etc
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1572 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -360,21 +360,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 != null) {
|
||||
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;
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user