function Lengths( shapesOrGeometries : , callback : , distanceUnits : , WKID : )
Array of VEShapes or JSON-formatted object containing geometries to be measured.
Function that will handle response. The callback function must take one argument, which will be a MeasureSet instance.
Type of distance units the distance result should be. Optional; defaults to meters for VEShapes. Ignored for measurement of JSON geometries.
Well known ID of the spatial reference. Required for measurement of JSON geometries for VEShapes. Ignored for measurement of VEShapes.
If using JSON geometries, you must specify the spatial reference identifier (WKID), since the JSON object can be in any coordinate system. The WKID can be specified with the numeric identifier, or you can use the SRUnitTypes enumeration. The distanceUnits parameter is ignored for JSON geometries (so may be set to null), because the returned measurement is in the units of the spatial reference, not necessarily meters.
For examples of using this function with both VEShapes and JSON geometries, see the "Work with Geometry" section of the Interactive SDK.