<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Hi list,<br>
I've a problem with proj4js library:<br>
<br>
if I use it in my Ol project like this:<br>
<br>
Proj4js.defs["EPSG:3035"] = "+proj=laea +lat_0=52 +lon_0=10
+x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs ";<br>
Proj4js.defs["EPSG:4326"] = "+proj=longlat +ellps=WGS84 +datum=WGS84
+no_defs ";<br>
<br>
var coord = map.getLonLatFromPixel(new
OpenLayers.Pixel(event.xy.x,event.xy.y));<br>
// utilizzo la libreria proj4js di boygenius per riottenere lat e lon
dalla mappa con un epsg diverso da 4326<br>
var sourceProj = new Proj4js.Proj(map.getProjection());<br>
var destProj = new Proj4js.Proj("EPSG:4326");<br>
var p = new OpenLayers.Geometry.Point(coord.lon, coord.lat);<br>
OpenLayers.Console.log(p);<br>
Proj4js.transform(sourceProj, destProj,p);<br>
OpenLayers.Console.log(p);<br>
<br>
those that I obtain in firebug for example is:<br>
<br>
</tt><a class="objectLink objectLink-object"><span class="objectTitle">POINT(4375185.477325439
2300601.9556884766)</span> id=<span class="objectPropValue">OpenLayers.Geometry.Point_231</span></a>
<div class="logRow logRow-log"><span class="objectBox objectBox-text"></span>
<a class="objectLink objectLink-object"><span class="objectTitle">POINT(2.3206480904276474
-57.2957795131)</span> id=<span class="objectPropValue">OpenLayers.Geometry.Point_231</span></a></div>
<br>
and is not corret because the new point 'd be like 10,... 43,...<br>
<br>
do you know why this?<br>
I use Ol 2.5 stable and not svn where I can find
OpenLayers.Projection.transform function<br>
<br>
W<br>
<pre class="moz-signature" cols="72">--
Please no .doc, .xls, .ppt, .dwg:
<a class="moz-txt-link-freetext" href="https://www.faunalia.it/dokuwiki/doku.php?id=public:OpenFormats">https://www.faunalia.it/dokuwiki/doku.php?id=public:OpenFormats</a>
Walter Lorenzetti
email+jabber: <a class="moz-txt-link-abbreviated" href="mailto:lorenzetti@faunalia.it">lorenzetti@faunalia.it</a>
<a class="moz-txt-link-abbreviated" href="http://www.faunalia.it">www.faunalia.it</a>
Cell: (+39) 347-6597931 Tel+Fax: (+39) 0587-213742
Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy</pre>
</body>
</html>