Description
Class added v2.0.
Input parameters for the areasAndLengths() method on the Geometry Serivce. Sets the lengthunits,areaUnit and other parameters.
Samples
Search for
samples that use this class.
Class hierarchy
esri.tasks.AreasAndLengthsParameters
Constructor
Properties
| areaUnit |
esri.tasks.GeometryService Constant
|
The area unit in which areas of polygons will be calculated. It can be any esriAreaUnits constant. If unit is not specified, the units are derived from sr. For a list of valid units, see esriSRUnitType constants and esriSRUnit2Type Constants. |
| lengthUnit |
esri.tasks.GeometryService Constant
|
The length unit in which perimeters of polygons will be calculated. It can be any esriUnits constant. If unit is not specified, the units are derived from sr. For a list of valid units, see esriSRUnitType constants and esriSRUnit2Type Constants. |
| polygons |
String
|
Polygon geometries for which to compute areas and lengths |
Constructor Detail
esri.tasks.AreasAndLengthsParameters()
Creates a new AreasAndLengthsParameters object.
Code snippets:
var areasAndLengthParams = new esri.tasks.AreasAndLengthsParameters();
Properties Detail
<esri.tasks.GeometryService Constant> areaUnit
The area unit in which areas of polygons will be calculated. It can be any esriAreaUnits constant. If unit is not specified, the units are derived from sr. For a list of valid units, see esriSRUnitType constants and esriSRUnit2Type Constants.
Code snippets:
areasAndLengthParams.areaUnit = esri.tasks.GeometryService.UNIT_ACRES;
<esri.tasks.GeometryService Constant> lengthUnit
The length unit in which perimeters of polygons will be calculated. It can be any esriUnits constant. If unit is not specified, the units are derived from sr. For a list of valid units, see esriSRUnitType constants and esriSRUnit2Type Constants.
Code snippets:
areasAndLengthParams.lengthUnit = esri.tasks.GeometryService.UNIT_FOOT;
Polygon geometries for which to compute areas and lengths
Code snippets:
geometryService.simplify([geometry], function(simplifiedGeometries) {
areasAndLengthParams.polygons = simplifiedGeometries;
geometryService.areasAndLengths(areasAndLengthParams);
});