When to use "project" when calculating areas and lengths?

Discussion created by sl5337 on May 23, 2014
Newbie here. I'm in the process of converting a Flex viewer to Javascript and currently working on a Draw and Measure widget. I noticed in the Flex version that a call to "project" is being made before the call to calculate lengths. I'm trying to understand when and why this needs to be called as opposed to just calling the "lengths" function of the GeometryService.  According to the sample documentation for the Javascript API the "Measure distances" sample is supposed to be using "project" but when I look at the sample code it is just calling the "lengths" function of GeometryService.  I understand it has something to do with the coordinate system being used by the map but if someone could provide some more detail for me on when to call "project" it would be very helpful. Thanks.