wiki:UserGuide

Version 1 (modified by madair, 16 years ago) ( diff )

--

User Guide

Using Proj4js is a matter of including the library in your page, creating source and destination Proj objects, transforming point coordinates.

<script src="lib/proj4js-combined.js"></script>

…
var source = new Proj4js.Proj(‘EPSG:4236’);
var dest = new Proj4js.Proj(‘EPSG:42304’);
var p = new Proj4js.Point(-76.0,45.0);
Proj4js.transform(source, dest, p);
…

p.x and p.y are now EPSG:42304 easting and northing in meters

Every Proj object must be initialized with the parameters of the CRS to be used.

If you know the projections to be used in your application

<script src="lib/defs/EPSG42304.js"></script >

Using dynamic lookup of initialization parameters

Note: See TracWiki for help on using the wiki.