[OpenLayers-Users] Unable to get displayProjection working

George Mu'ammar George at muammar.net
Fri Apr 10 17:39:43 EDT 2009


Hi CJ good to hear from you.
The last time I faced this issue I also got the impression I was doing  
something wrong. Simply put I got what I wanted, ie the coordinates in  
EPSG 4326. But I had not included the Proj4s! I was baffled but stuck  
to it because it was what I wanted anyway.
Therefore I would suggest that your Proj4s is not properly included in  
your js script or something to that effect.
All the best.

-- 
G.
skype:   geo-rge-118
twitter: geo_twit


Quoting CJ Hendrix <hendrix.cj at gmail.com>:

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





More information about the Users mailing list