Hi all, I'm new to ArcGis SDK, lately I have been trying to find the x-y coordinate, length and area of AGSPoint, AGSPolyline and AGSPolygon drawn on a sketchlayer. The steps I did1. Created an instance of AGSGeometryTaskService, initialized with server and set delegate.2. Extraced the AGSGeometry information from sketchlayer.geometry. 3. Created an instance of AGSAreasAndLengthsParameters, set the units, assigned an array of Geometry objects and passed these parameters to areasAndLengthsWithParameters4. The response obtained was not in the units specified in the parameters. self.gst = [[[AGSGeometryServiceTask alloc]initWithURL:[NSURL URLWithString:kGeometryServerURL]]autorelease];
self.gst.delegate = self;
AGSGeometry* sketchGeometry = [[_sketchLayer.geometry copy] autorelease];
//NSLog(@%@",sketchGeometry);
AGSAreasAndLengthsParameters *areaAndLengthParams = [[AGSAreasAndLengthsParameters alloc]init];
areaAndLengthParams.areaUnit = AGSAreaUnitsSquareMeters;
areaAndLengthParams.lengthUnit = AGSSRUnitMeter;
areaAndLengthParams.polygons = [NSArray arrayWithObject:sketchGeometry];
[self.gst areasAndLengthsWithParameters:areaAndLengthParams];
[areaAndLengthParams release];
Any information on where I'm doing wrong is much appreciated .