Hello,<br><br>I&#39;m trying to make a zoomToExtent based on a postgres table which has in the same column the values for defining a bounding box. So, for each record there i have one field with minx, miny, maxx and maxy (example of a record: &quot;010101&quot;, &quot;-8.341552734375, 40.4988288879395, -8.24995231628418, 40.5880279541016&quot;). On my application i have 3 combos which leads the user to select one record from that table and to parse a variable (called freg) with the bounding box exactly as shown before. Finally, i have a button with the following handler:<br>
<br>console.log(freg);<br><br>var bbounds = new OpenLayers.Bounds(freg);<br>console.log(&#39;bbounds: &#39; + bbounds);<br>var centrarBB = bbounds.transform(wgs, mercator);<br>console.log(&#39;centrarBB:&#39; + centrarBB);<br>
map.zoomToExtent(centrarBB, {closest: true});<br><br>I think this code is working. The problem happens just in the beginning when defining openlayers bounds (it is just accepting the first coordinate from the variable freg. Here is the output form firebug:<br>
<br><div class="logRow logRow-log"><span class="objectBox objectBox-text">freg: -6.94578313827515, 41.2489624023438, -6.88994789123535, 41.317310333252</span></div><div class="logRow logRow-log"><span class="objectBox objectBox-text">bbounds: left-bottom=(-6.94578313827515,null) right-top=(null,null)</span></div>
<div class="logRow logRow-log"><span class="objectBox objectBox-text">centrarBB:left-bottom=(-773201.0421132954,-7.081154551613622e-10) right-top=(0,-7.081154551613622e-10)<br><br>Do you have any suggestions??<br>Thanks in advance,<br>
<br>Hugo<br></span></div><br>