[OpenLayers-Users] map coordinates in different coordinate system
stretch
andrew.deklerk at gmail.com
Mon Jun 29 14:27:22 EDT 2009
Hi all
I am trying to display my map coordinates in a different coordinate system
to what the map is in. I have followed the instructions with using proj4js
and have the following setup:
-------------------------------
var options = { scales: [50000, 35000, 25000, 20000,
15000,10000,7500,5000,2500,1000,500],
maxExtent: new
OpenLayers.Bounds(-80999,-3309314,-74182,-3305038),
'projection':'EPSG:2054',
units:'m' };
map = new OpenLayers.Map( $('map'),options);
var mp=new OpenLayers.Control.MousePosition({div:$('coordsdd')});
mp.displayProjection = new OpenLayers.Projection("EPSG:4148");
map.addControl(mp);
--------------------------------
I am referencing the proj4js combined and compressed js file, and I am
referencing the two additional EPSG2054.js and EPSG4148.js, which contain:
Proj4js.defs["EPSG:2054"] = "+proj=tmerc +lon_0=31 +datum=WGS84";
and
Proj4js.defs["EPSG:4148"] = "+proj=longlat +ellps=WGS84
+towgs84=0,0,0,0,0,0,0 +no_defs ";
The coordinates are changed, but not correctly - i.e they are converted from
metres to metres, where they should be displaying dd.
The first thing you will notice is that 2054 is not a standard. Does this
definition need to be included somewhere in the proj4js file.
Thanks in advance
Andrew
--
View this message in context: http://n2.nabble.com/map-coordinates-in-different-coordinate-system-tp3176189p3176189.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list