<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<font style="font-size:10pt;" face="Arial" color="#1F497D" size="2"><br id="FontBreak"></font><br><br><font style="font-size: 12pt;" face="Arial" color="#1F497D" size="3">you need to set the transform explicitly, it worked for me, something like this:<br><br></font><pre><span class="kd">var</span> <span class="nx">proj</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">OpenLayers</span><span class="p">.</span><span class="nx">Projection</span><span class="p">(</span><span class="s2">"EPSG:4326"</span><span class="p">);</span>
<span class="kd">var</span> <span class="nx">point</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">OpenLayers</span><span class="p">.</span><span class="nx">LonLat</span><span class="p">(</span><span class="o">-</span><span class="mi">71</span><span class="p">,</span> <span class="mi">42</span><span class="p">);</span>
<span class="nx">map</span><span class="p">.</span><span class="nx">setCenter</span><span class="p">(</span><span class="nx">point</span><span class="p">.</span><span class="nx">transform</span><span class="p">(</span><span class="nx">proj</span><span class="p">,</span> <span class="nx">map</span><span class="p">.</span><span class="nx">getProjectionObject</span><span class="p">()));</span>
</pre><br><font style="font-size:12pt" face="Arial" color="#1F497D" size="3">check here for more info: http://docs.openlayers.org/library/spherical_mercator.html<br><br>Hope this helps,<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>__________________________________________________________________________________________<br>Piensa en el medio ambie<font style="" face="Arial">nte - mantenlo en la pantalla. NO lo imprimas si NO es necesario.</font></font><font style="font-size:12pt" face="Arial" color="#1F497D" size="3"><br></font><font style="font-size:12pt" face="Arial" color="#1F497D" size="3">Think green - keep it on the screen. Do NOT print if it is NOT necessary.</font><font style="font-size:12pt" face="Arial" color="#1F497D" size="3"><br></font><font style="font-size:12pt" face="Arial" color="#1F497D" size="3"><span id="ecxresult_box" class="ecxshort_text" lang="de"><span class="ecxhps">Denken Sie an</span> <span class="ecxhps">die Umwelt</span></span></font><font style="font-size:12pt" face="Arial" color="#1F497D" size="3"><span id="ecxresult_box" lang="de"><span class="ecxhps"></span> <span class="ecxhps">-</span> <span class="ecxhps">bewahren Sie es</span> <span class="ecxhps">auf dem Bildschirm.</span> <span class="ecxhps">Drucken Sie NICHT</span><span>, wenn</span> <span class="ecxhps">es NICHT notwendig ist</span><span>.</span></span></font><br><br><br><div><div id="SkyDrivePlaceholder"></div>> Date: Wed, 18 Jul 2012 04:02:02 -0700<br>> From: coffi@hotmail.co.uk<br>> To: openlayers-users@lists.osgeo.org<br>> Subject: [OpenLayers-Users] Problem with restrictedExtent<br>> <br>> hI,<br>> Not sure what I am doing wrong but when I try to restrict extent by<br>> coordinates by British national grid (shown in code) or google mercator the<br>> extent is centred of west coast of africa rather than a uk city. Relevant<br>> code is shown below and any tips would be greatly appreciated. <br>> <br>> <br>> <br>> Gary<br>> <br>> --<br>> View this message in context: http://osgeo-org.1560.n6.nabble.com/Problem-with-restrictedExtent-tp4989031.html<br>> Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>> _______________________________________________<br>> Users mailing list<br>> Users@lists.osgeo.org<br>> http://lists.osgeo.org/mailman/listinfo/openlayers-users<br></div> </div></body>
</html>