I am using the Proj.4 java library that can be found here And I am pretty much unsure on how can I implement a code that looks like this in Proj.4JS:
// include the library
<script src="lib/proj4js-combined.js"></script> //adjust the path for your server
//or else use the compressed version
// creating source and destination Proj4js objects
// once initialized, these may be re-used as often as needed
var source = new Proj4js.Proj('EPSG:4326'); //source coordinates will be in Longitude/Latitude, WGS84
var dest = new Proj4js.Proj('EPSG:4141'); //destination coordinates in meters, global spherical mercators projection, see http://spatialreference.org/ref/epsg/3785/
// transforming point coordinates
var p = new Proj4js.Point(-76.0,45.0); //any object will do as long as it has 'x' and 'y' properties
Proj4js.transform(source, dest, p); //do the transformation. x and y are modified in place
//p.x and p.y are now EPSG:3785 in meters
I am new to the whole projection subjects and I really want to know what am I doing. I need to convert my coordinate system from WGS84 to EPSG:4141 but Proj.4 Java library is not documented at all and I can't really find out on how to use it.
Is anyone familiar with this?