Hi,<br><br>I need to reproject a point to a pre-defined projection (Proj4js.defs["EPSG:23031"] = "+proj=utm +zone=31 +ellps=intl +units=m +no_defs ";).<br>The weird thing is that the projection is not working unless I insert and alert("stop for a while") after the line p = new OpenLayers.Projection('EPSG:23031');<br>
<br>Without the stop alert the point is shown in 4326 projection.<br>Isn't it weird?<br><br>Any ideas.<br>I'm lost.<br><br> <script src="../proj4js/lib/defs/EPSG23031.js"></script><br> <script src="../proj4js/lib/proj4js.js"></script><br>
<script src="../lib/OpenLayers.js"></script> <br><script type="text/javascript"><br>function init()<br>
{<br>
p = new OpenLayers.Projection('EPSG:23031');<br>//alert("stop for a while");<br>
var proj = new OpenLayers.Projection("EPSG:4326");<br>
var point = new OpenLayers.LonLat(-71, 42);<br>
alert(point.transform(proj, p));<br>
}<br>...<br></script><br><body onload=init()"><br>....<br><br><br>