ArcGIS API for WPF - Library Reference
AreasAndLengths Method
See Also  Send comments on this topic
ESRI.ArcGIS.Client.Tasks Namespace > GeometryService Class : AreasAndLengths Method

graphics
The graphics used to calculate areas and lengths.
lengthUnit
The length unit in which perimeters of polygons will be calculated. If unit is not specified, the units are derived from the spatial reference of the first geometry.
areaUnit
The area unit in which areas of polygons will be calculated. If unit is not specified, the units are derived from the spatial reference of the first geometry.
Calculates the areas and lengths of each specified polygon.

Syntax

Visual Basic (Declaration) 
Public Function AreasAndLengths( _
   ByVal graphics As IList(Of Graphic), _
   ByVal lengthUnit As Nullable(Of LinearUnit), _
   ByVal areaUnit As Nullable(Of LinearUnit) _
) As AreasAndLengths

Parameters

graphics
The graphics used to calculate areas and lengths.
lengthUnit
The length unit in which perimeters of polygons will be calculated. If unit is not specified, the units are derived from the spatial reference of the first geometry.
areaUnit
The area unit in which areas of polygons will be calculated. If unit is not specified, the units are derived from the spatial reference of the first geometry.

Return Value

Returns a collection of lengths and areas of each polygon that was passed into the function. The result length will be in the unit of measurement indicated by the "lengthUnit" parameter. The result area wil be in the unit of measurement indicated by the "areaUnit" parameter.If no "lengthUnit" or "areaUnit" parameter is indicated then the result length and/or area will be expressed in the same units as the spatial reference

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© ESRI, Inc. All Rights Reserved.