[postgis-users] How can i get accurate world coordinate (WGS84) with mouse click?
alex_chew at 163.com
Thu Nov 23 19:53:10 PST 2006
I am not sure it is fit to ask such a question here. It puzzled me several days.Thanks a lot to your kindly advise.
For sake of simplification, I set svg attribute,
viewBox = "103.75 -30.5 0.5 0.2"
height = "600"
width = "800"
pointx = parseFloat(evt.getClientX());
pointy = parseFloat(evt.getClientY());
px = pointx/this.currentScale/this.ratioX;//translate screen point to world one
py = pointy/this.currentScale/this.ratioY;//translate screen point to world one
worldx = this.viewBoxX;
worldy = this.viewBoxY;
markx = worldx+px;
marky = worldy+py;
What intrest me is when I look insight I found that markx is accurate while marky not.
Would you please show me a hand?
Any advice are appreciated.
More information about the postgis-users