[OpenLayers-Users] Unable to get displayProjection working

CJ Hendrix hendrix.cj at gmail.com
Fri Apr 10 17:10:22 EDT 2009


My map is in EPSG:900913, but I want to use displayProjection so that the
mousePosition control returns coordinates in EPSG:26716 (UTM zone 16 N,
nad27).

Proj4js is installed and I've downloaded the definition for EPSG:26716 from
spatialrefernce.org and loaded it into the script with

<script src="..\proj4js\lib\proj4js-combined.js"
type="text/javascript"></script>
<script src="..\proj4js\lib\defs\EPSG26716.js"
type="text/javascript"></script>
<script src="..\proj4js\lib\defs\EPSG900913.js"
type="text/javascript"></script>

The map and display projections are set with

projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:26716"),

But the only way I can get the mousePosition control to give me anything
other than EPSG:900913 is to set the displayProjection to EPSG:4326.  I've
tried several output projections.  It feels like I'm missing something
obvious.  Any help appreciated.

--cj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090410/c2ef0412/attachment.html


More information about the Users mailing list