diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js
index c681304959..c3dd3bd0b2 100644
--- a/lib/OpenLayers/Util.js
+++ b/lib/OpenLayers/Util.js
@@ -71,7 +71,7 @@ OpenLayers.Pixel.prototype = {
* @return whether or not the point passed in as parameter is equal to this
* @type bool
*/
- equal:function(px) {
+ equals:function(px) {
var d = this.diff(px);
return ((d.x == 0) && (d.y == 0));
},
@@ -181,7 +181,7 @@ OpenLayers.LonLat.prototype = {
/**
* @return Shortened String representation of OpenLayers.LonLat object.
- * (ex. "5,42")
+ * (ex. "5, 42")
* @type String
*/
toShortString:function() {
@@ -234,7 +234,8 @@ OpenLayers.LonLat.prototype = {
*/
OpenLayers.LonLat.fromString = function(str) {
var pair = str.split(",");
- return new OpenLayers.LonLat(pair[0], pair[1]);
+ return new OpenLayers.LonLat(parseFloat(pair[0]),
+ parseFloat(pair[1]));
};
@@ -308,7 +309,7 @@ OpenLayers.Bounds.prototype = {
* (ex. "5,42,10,45")
* @type String
*/
- toBBOX:function(){
+ toBBOX:function() {
return (this.minlon + "," + this.minlat + "," +
this.maxlon + "," + this.maxlat);
},
@@ -340,7 +341,10 @@ OpenLayers.Bounds.prototype = {
*/
OpenLayers.Bounds.fromString = function(str) {
var bounds = str.split(",");
- return new OpenLayers.Bounds(bounds[0],bounds[1],bounds[2],bounds[3]);
+ return new OpenLayers.Bounds(parseFloat(bounds[0]),
+ parseFloat(bounds[1]),
+ parseFloat(bounds[2]),
+ parseFloat(bounds[3]));
};
OpenLayers.Box = Class.create();