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?
Best Answer
Web Mercator Auxiliary Sphere is WKID 102100
http://resources.arcgis.com/en/help/arcgisonline-content/index.html#//011q00000002000000
6.1 cm short, good enough for govment work?