Problems converting to Lat Lng with the xyToLngLat method

Discussion created by doubleee on Oct 21, 2013
Latest reply on Oct 23, 2013 by doubleee
I'm a newbie to coordinates, so any help with my question is much appreciated. :)

I???m having trouble converting X Y coordinates (RT90) to lat and lng (I think it???s called WGS84?). I'm using an API that returns X and Y coordinates and I get quite strange results when calling the esri.geometry.xyToLngLat(long,lat) method.

For example when I pass  X= 6570898 Y = 1630111  (a bit south of Stockholm, Sweden) the method should return lat: 59.239121,  lng: 18,085032. But instead the esri.geometry.xyToLngLat method returns lat: 59.02738103790395 lng: 14.486671705724888.

Which is very very far west of Stockholm Sweden???..

As I said, I???m a newbie. What I???m I doing wrong? :)
Any help, much appreciated!

Kind regards