new esri.tasks.DistanceParameters()

Specifies the units for measuring distance between geometry1 and geometry2. See the constants table of GeometryService for a list of valid values. If the unit is not specified the units are derived from the spatial reference.

The geometry from which the distance is to be measured. The geometry can be one of the following geometry types: esriGeometryPoint | esriGeometryPolyline | esriGeometryPolygon | esriGeometryMultipoint.