Proj4js

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Proj4js

swimming123
I just need a conversion between EPSG:4269 and Google Web Mercator in client side, then I copy a proj4js-combined.js from this folder:
C:\Program Files\Autodesk\Autodesk Infrastructure Web Server Extension 2013\www\fusion\lib\Proj4js  
Open the proj4 javascript file and find it defines EPSG:3875 as Google Mercator; I think it must be wrong, Google Web Mercator suppose EPSG: 3857;

Of course, I use EPSG:900913 to do the calculation to avoid this issue. For curiosity, I did  test using EPSG:3857 or EPSG:3875, both not working.
Reply | Threaded
Open this post in threaded view
|

Re: Proj4js

GordonL
Yes, I have noticed that.  I usually manually assign my proj4 before doing any transform:

i.e.

Proj4js.defs["EPSG:3857"]="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs";

var dest = new Proj4js.Proj('EPSG:3857');
var source = new Proj4js.Proj('EPSG:4326');

Proj4js.transform(source, dest, point);