Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lat = 39.74043 long = -465.01719
- X = 40674737.46566756 Y = 10890477.404555319.
- x=3135764.7952012 y=1694936.04430735.
- // formatting lat long click event results to pass to proj4
- // not the best method but bare with me
- var lat_lng = e.latlng;
- var lat_lng = lat_lng.toString();
- var lat_lng = lat_lng.substr(7,20);
- var lat_lng = new String(lat_lng);
- var epsg900913 = new Proj4js.Proj('EPSG:900913');
- var epsg2232 = new Proj4js.Proj('EPSG:2232');
- var xy = new Proj4js.Point(lat_lng);
- Proj4js.transform(epsg900913,epsg2232,xy);
- // here is the EPSG string that epsg900913 references.
- //Proj4js.defs["EPSG:900913"]= "+title=GoogleMercator +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";
- // here is the EPSG string that epsg2232 references.
- // Proj4js.defs["EPSG:2232"] = "+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement