<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Did you include the definition for EPSG:26915? Otherwise it will
try to look it up via a proxy.<br>
<br>
<pre>Proj4js.defs["EPSG:26915"] = "+proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m +no_defs";
Mike
</pre>
<br>
<br>
On 31/10/2011 10:41 PM, Matthew Pettis wrote:
<blockquote
cite="mid:CAH5CWrQvaiT_rRqA=YgpmEotrVSRp4eE808yKFDKzPU1tdaagg@mail.gmail.com"
type="cite">
<div>I am trying to do a coordinate transform of bounds in
Openlayers, and have tried the following, which, for both
console.log() statements, gives me the same bounds in both cases
(but I expect the second statement to give me bounds in
EPGS:4326):</div>
<div><br>
</div>
<div>
<div>
<div> <html xmlns="<a moz-do-not-send="true"
href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>"></div>
<div> <head></div>
<div> <title>Bounds Example</title></div>
<div> <script
src="/OpenLayers-2.10/OpenLayers.js"></script></div>
<div> <script type="text/javascript"></div>
<div> function init(){</div>
<div> var fromProjection = new
OpenLayers.Projection("EPSG:26915");</div>
<div> var toProjection = new
OpenLayers.Projection("EPSG:4326");</div>
<div> var extent = new
OpenLayers.Bounds(189775.379950,4816289.746171,761662.354535,5472414.143295);</div>
<div>
console.log(extent);</div>
<div>
console.log(extent.transform(fromProjection,toProjection));</div>
<div> }</div>
<div> </script></div>
<div> </head></div>
<div>
</div>
<div> <body onload="init()"></div>
<div> </body></div>
<div> </div>
<div> </html></div>
</div>
</div>
<div><br>
</div>
<div>In both console.log() statements, I get the following object
(c&p from Chrome javascript debugger):</div>
<div><br>
</div>
<div> Class</div>
<div> bottom: 4816289.746171</div>
<div> centerLonLat: null</div>
<div> left: 189775.37995</div>
<div> right: 761662.354535</div>
<div> top: 5472414.143295</div>
<div> __proto__: Object</div>
<div><br>
</div>
<div>I read the documentation for proj4js with openlayers here,
and it tells me:</div>
<div><br>
</div>
<div>OpenLayers integrates with Proj4js if the library is
available. This will make using it a bit easier. Having it in
the same folder as OpenLayers.js will make it available.</div>
<div><br>
</div>
<div>Which I did via a symlink:</div>
<div><br>
</div>
<div> matt@xxxxxxxx:/var/www/xxxxx$ ll
/var/www/OpenLayers-2.10/</div>
<div> total 1008</div>
<div> drwxr-xr-x 13 matt matt 4096 Nov 1 01:49 .</div>
<div> drwxrwxrwx 30 root root 4096 Nov 1 01:43 ..</div>
<div> -rw-r--r-- 1 matt matt 945828 Sep 9 2010 OpenLayers.js</div>
<div> ...</div>
<div> lrwxrwxrwx 1 matt matt 31 Nov 1 01:49 proj4js.js
-> /var/www/proj4js/lib/proj4js.js</div>
<div> ...</div>
<div><br>
</div>
<div>Can someone help me diagnose what I'm doing wrong here?</div>
<div><br>
</div>
<div>Thanks, Matt</div>
<div><br>
</div>
<div>PS -- I've crossposted from stackoverflow, as I don't know
which place is getting more activity -- <a
moz-do-not-send="true"
href="http://stackoverflow.com/questions/7961872/openlayers-bounds-transform-not-doing-transform">http://stackoverflow.com/questions/7961872/openlayers-bounds-transform-not-doing-transform</a></div>
<div><br>
</div>
<div><br>
</div>
-- <br>
Do not seek to follow in the footsteps of the wise men of old.
Seek what they sought.<br>
<br>
- Matsuo Munefusa (”Basho”)<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a>
</pre>
</blockquote>
</body>
</html>