reinsertion of r1572
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1607 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
+18
-15
@@ -367,21 +367,24 @@ OpenLayers.Bounds.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Simple String representation of OpenLayers.Bounds object.
|
* @param {int} decimal How many significant digits in the bbox coords?
|
||||||
* (ex. <i>"5,42,10,45"</i>)
|
* Default is 6
|
||||||
* @type String
|
*
|
||||||
*/
|
* @returns Simple String representation of OpenLayers.Bounds object.
|
||||||
toBBOX:function(power) {
|
* (ex. <i>"5,42,10,45"</i>)
|
||||||
var mult;
|
* @type String
|
||||||
if (power) {
|
*/
|
||||||
mult = Math.pow(10,power);
|
toBBOX:function(decimal) {
|
||||||
} else {
|
if (decimal== null) {
|
||||||
mult = Math.pow(10,6);
|
decimal = 6;
|
||||||
}
|
}
|
||||||
return (Math.round(this.left*mult)/mult + "," +
|
var mult = Math.pow(10, decimal);
|
||||||
Math.round(this.bottom*mult)/mult + "," +
|
var bbox = Math.round(this.left * mult) / mult + "," +
|
||||||
Math.round(this.right*mult)/mult + "," +
|
Math.round(this.bottom * mult) / mult + "," +
|
||||||
Math.round(this.top*mult)/mult);
|
Math.round(this.right * mult) / mult + "," +
|
||||||
|
Math.round(this.top * mult) / mult;
|
||||||
|
|
||||||
|
return bbox;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user