You are passing bounds into your setCenter function.<div><span style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;font-size:12px;line-height:21px;background-color:rgb(255,255,255)">map.setCenter(extend, 6);</span> </div>
<div><br></div><div>What openlayers will do here is take the first x and y coord and zoom there (which is prob why it's at the wrong location).</div><div><br></div><div>Use either  map.zoomToExtent(bounds, closest)</div>
<div>or setCenter passing the correct coordinates.</div><div><br></div><div>See here for proper usage;</div><div><br></div><div><a href="http://dev.openlayers.org/docs/files/OpenLayers/Map-js.html#OpenLayers.Map.zoomToExtent">http://dev.openlayers.org/docs/files/OpenLayers/Map-js.html#OpenLayers.Map.zoomToExtent</a> </div>
<div><br></div><div>Toby<br><br><div class="gmail_quote">On 3 July 2012 09:23, Pedro Costa <span dir="ltr"><<a href="mailto:pedrocostaarma@sapo.pt" target="_blank">pedrocostaarma@sapo.pt</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I want to transform coordinates in EPSG: 27492 to  EPSG:900913 and center the map with the result but openlayers fixed map in the wrong place.<br>
<br>
I did so:<br>
<br>
<a href="http://pastebin.com/Uph7CWtg" target="_blank">http://pastebin.com/Uph7CWtg</a><br>
<br>
<br>
Can anyone help me with that?I'm doing something wrong?<br>
<br>
Thanks<br>
______________________________<u></u>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org" target="_blank">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/openlayers-<u></u>users</a><br>
</blockquote></div><br></div>