<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style>
<!--
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
@font-face
        {font-family:Consolas}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
span.hps
        {}
span.EmailStyle18
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
.MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:72.0pt 72.0pt 72.0pt 72.0pt}
div.WordSection1
        {}
-->
</style>
</head>
<body bgcolor="white" lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">I would suggest setting the SRS of your map (EPSG:90913) in the WMS request also.</span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></a></p>
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:windowtext">From:</span></b><span lang="EN-US" style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:windowtext"> openlayers-users-bounces@lists.osgeo.org
 [mailto:openlayers-users-bounces@lists.osgeo.org] <b>On Behalf Of </b>Pedro Costa<br>
<b>Sent:</b> 03 July 2012 21:38<br>
<b>To:</b> Tobias Reinicke<br>
<b>Cc:</b> openlayers-users@lists.osgeo.org<br>
<b>Subject:</b> Re: [OpenLayers-Users] transform coordinates</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal">I'm resolved using map.zoomToExtend...<br>
But now i have another problem...<br>
<br>
My code:<br>
<br>
<a href="http://pastebin.com/zizWku8a">http://pastebin.com/zizWku8a</a><br>
<br>
<br>
<span class="hps"><span lang="EN">I want</span></span><span lang="EN"> <span class="hps">
to</span> <span class="hps">add a</span> <span class="hps">WMS layer from geosever to</span>
<span class="hps">map, reprojected to srs 900913 but it is not</span> <span class="hps">
visible</span> <span class="hps">in the</span> <span class="hps">correct</span> <span class="hps">
area</span>.<br>
I only see osm layer.<br>
<span class="hps">Does anyone know</span> <span class="hps">what I'm</span> <span class="hps">
doing wrong</span>?<br>
<span class="hps">I know he</span> <span class="hps">is working</span> <span class="hps">
because I</span> <span class="hps">added</span> <span class="hps">the</span> <span class="hps">
same wms (non reprojected) to other</span> <span class="hps">maps, without the</span>
<span class="hps">osm</span> <span class="hps">layer</span>, and worked.<br>
<br>
Thanks<br>
</span><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Em 03-07-2012 09:43, Tobias Reinicke escreveu:</p>
</div>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<p class="MsoNormal">You are passing bounds into your setCenter function. </p>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt; font-family:Consolas; background:white">map.setCenter(extend, 6);</span> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">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).</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">Use either  map.zoomToExtent(bounds, closest)</p>
</div>
<div>
<p class="MsoNormal">or setCenter passing the correct coordinates.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">See here for proper usage;</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"><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> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Toby</p>
<div>
<p class="MsoNormal">On 3 July 2012 09:23, Pedro Costa <<a href="mailto:pedrocostaarma@sapo.pt" target="_blank">pedrocostaarma@sapo.pt</a>> wrote:</p>
<p class="MsoNormal">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>
_______________________________________________<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/mailman/listinfo/openlayers-users</a></p>
</div>
<p class="MsoNormal"> </p>
</div>
</blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt"> </p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1"><br>
DISCLAIMER:<br>
<br>
This email may contain confidential information and is intended only for the use of the specific individual(s) to which it is addressed. If you are not the intended recipient of this email, you are hereby notified that any unauthorized use, dissemination or
 copying of this email or the information contained in it or attached to it is strictly prohibited. If you received this message in error, please immediately notify the sender at Infotech or Mail.Admin@infotech-enterprises.com and delete the original message.<br>
</font>
</body>
</html>