<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 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 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>