Please help to do Union of Multiple polygons. Below is my code.
FeatureSet contains Polygon Feature
AGSMutableEnvelope * env2;
if([featureSet.features count]>0){
for (int i=0 ; i<[featureSet.features count]; i++ ) {
graphic=[featureSet.features objectAtIndex:i];
if (i==0)
env2=(AGSMutableEnvelope *)graphic.geometry.envelope;
else
{
AGSEnvelope *env1=graphic.geometry.envelope;
//[env2 unionWithEnvelope:<#(AGSEnvelope *)#>]
@try {
[env2 unionWithEnvelope:env1];
}
@catch (NSException *exception) {
NSLog(@"%@",[exception description]);
}
}
graphic.symbol=fillSymbol;
//graphic.infoTemplateDelegate=self.projectInfoTemp;
[self.graphicsProjectQryLayer addGraphic:graphic];
}