Hi Nimesh,
Thank you for your responses.
How about using graphics layer with logic to detect 2nd click below, please assume that the below code is written in the successful if condition to detect second click:
AGSMutablePolygon* sketchPolygon = [[AGSMutablePolygon alloc] initWithSpatialReference:self.mapView.spatialReference];
self.mappoint2=mappoint;
NSLog(@"minx,miny,maxx,maxy:%f,%f,%f,%f",self.mappoint1.x,self.mappoint1.y, self.mappoint2.x,self.mappoint2.y);
[sketchPolygon addRingToPolygon];
[sketchPolygon addPointToRing:[AGSPoint pointWithX:self.mappoint1.x y:self.mappoint1.y spatialReference:self.mapView.spatialReference]];
[sketchPolygon addPointToRing:[AGSPoint pointWithX:self.mappoint2.x y:self.mappoint1.y spatialReference:self.mapView.spatialReference]];
[sketchPolygon addPointToRing:[AGSPoint pointWithX:self.mappoint2.x y:self.mappoint2.y spatialReference:self.mapView.spatialReference]];
[sketchPolygon addPointToRing:[AGSPoint pointWithX:self.mappoint1.x y:self.mappoint2.y spatialReference:self.mapView.spatialReference]];
[sketchPolygon addPointToRing:[AGSPoint pointWithX:self.mappoint1.x y:self.mappoint1.y spatialReference:self.mapView.spatialReference]];
AGSGraphic *graphic;
AGSSimpleFillSymbol* myFillSymbol = [AGSSimpleFillSymbol simpleFillSymbol];
myFillSymbol.color = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
graphic = [AGSGraphic graphicWithGeometry:sketchPolygon symbol:myFillSymbol attributes:nil infoTemplateDelegate:nil];
[self.graphicsLayer addGraphic:graphic];
but nothing shows up on the screen, any suggestions on what I am doing wrong?
Thanks,
Ashraf