Changeset 121
- Timestamp:
- 05/18/06 00:21:29 (3 years ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Util.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Util.js
r120 r121 72 72 * @type bool 73 73 */ 74 equal :function(px) {74 equals:function(px) { 75 75 var d = this.diff(px); 76 76 return ((d.x == 0) && (d.y == 0)); … … 182 182 /** 183 183 * @return Shortened String representation of OpenLayers.LonLat object. 184 * (ex. <i>"5, 42"</i>)184 * (ex. <i>"5, 42"</i>) 185 185 * @type String 186 186 */ … … 235 235 OpenLayers.LonLat.fromString = function(str) { 236 236 var pair = str.split(","); 237 return new OpenLayers.LonLat(pair[0], pair[1]); 237 return new OpenLayers.LonLat(parseFloat(pair[0]), 238 parseFloat(pair[1])); 238 239 }; 239 240 … … 309 310 * @type String 310 311 */ 311 toBBOX:function() {312 toBBOX:function() { 312 313 return (this.minlon + "," + this.minlat + "," + 313 314 this.maxlon + "," + this.maxlat); … … 341 342 OpenLayers.Bounds.fromString = function(str) { 342 343 var bounds = str.split(","); 343 return new OpenLayers.Bounds(bounds[0],bounds[1],bounds[2],bounds[3]); 344 return new OpenLayers.Bounds(parseFloat(bounds[0]), 345 parseFloat(bounds[1]), 346 parseFloat(bounds[2]), 347 parseFloat(bounds[3])); 344 348 }; 345 349
