Proj4js.defs["EPSG:2322"] = "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs ";
Proj4js.defs["EPSG:4326"] = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs";
alert(feature.geometry.getVertices()[0].x);
alert(feature.geometry.getVertices()[0].y);
var point = new Proj4js.Point(feature.geometry.getVertices()[0].x, feature.geometry.getVertices()[0].y);
//Define the source Coord Sys
var src = new Proj4js.Proj("EPSG:4326");
//Define the destination Coord Sys
var dst = new Proj4js.Proj("EPSG:2322");
var gk= Proj4js.transform(src, dst, point);
alert(gk);
i can get x and y cordinates but when i convert them to epsg 2322. x will change but y is always zero.
i found thats code but it is not converting correct
Proj4js.defs["EPSG:2322"] = "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs";
Proj4js.defs["EPSG:4326"] = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs";
Proj4js.defs["GOOGLE"] = "+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";
Proj4js.defs["EPSG:900913"] = Proj4js.defs["GOOGLE"];
//Define the source Coord Sys
var src = new Proj4js.Proj("EPSG:900913");
//Define the destination Coord Sys
var dst = new Proj4js.Proj("EPSG:2322");
var point = new Proj4js.Point(feature.geometry.getVertices()[0].x, feature.geometry.getVertices()[0].y);
Proj4js.transform(src, dst, point);