The function getLength(point1, point2) should calculate distances between two points.
When I am trying to calculate distance between points having 100 meters between them
p1=new esri.geometry.Point(3997030.6690969253, 7444299.320646087, new esri.SpatialReference({ wkid: 102113 }));
Object
p2=new esri.geometry.Point(3996951.455397143, 7444142.154020177, new esri.SpatialReference({ wkid: 102113 }));
Object
esri.geometry.getLength(p1, p2)
176.00045037719127
I am getting 176 which is wrong. Projection is Web Mercator (WKID 102113).
@Krystian found that getLength
uses just Pythagoras theorem to calculate length. So it gives length in projection meters. How to obtain distance in real meters?
getLength
does not understand projection. Or may be I don't understand something. – Suzan Cioc Jan 31 '13 at 12:59