Hi,
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 ";).
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');
Without the stop alert the point is shown in 4326 projection.
Isn't it weird?
Any ideas.
I'm lost.
<script src="../proj4js/lib/defs/EPSG23031.js"></script>
<script src="../proj4js/lib/proj4js.js"></script>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
function init()
{
p = new OpenLayers.Projection('EPSG:23031');
//alert("stop for a while");
var proj = new OpenLayers.Projection("EPSG:4326");
var point = new OpenLayers.LonLat(-71, 42);
alert(point.transform(proj, p));
}
...
</script>
<body onload=init()">
....
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users