I am getting a very strange problem when converting from mappoint to screenpoint.
I am using the following code:
var sp = esri.geometry.ScreenPoint(512, 151); mp = map.toMap(screenPoint);
After converting from screenpoint(512, 151) to mappoint, I get the following map coordinates:
Now when I perform the reverse conversion (i.e., from the same point above which is mappoint(338638.7275175141, 4404774.250335829) to screenPoint), I get a very different screenpoint (i.e. 31563417740, -72455974). I think I should get the same screenpoint(512, 151) coordinate. For this reverse conversion I am using the following code:
mp1 = new esri.geometry.Point(338638.7275175141, 4404774.250335829); sp1 = map.toScreen(mp1);
With it, I get a very different screenpoint as I showed before and no the value (512,151).
Any help will be appreciated,