AGSMutableEnvelope * env2 = nil; if([featureSet.features count]>0) { for (int i=0 ; i<[featureSet.features count]; i++ ) { graphic=[featureSet.features objectAtIndex:i]; if (env2 == nil) { // graphic.geometry.envelope is an AGSEnvelope // We need to derive a new AGSMutableEnvelope from it. env2=[graphic.geometry.envelope mutableCopy]; } else { // This is not the first graphic we've come across, so we'll // extend the working envelope (env2) to include it [env2 unionWithEnvelope:graphic.geometry.envelope]; } // Add the graphic to our graphics layer graphic.symbol=fillSymbol; [self.graphicsProjectQryLayer addGraphic:graphic]; } // env2 will now contain all the graphics we just looped over. // Refresh the graphics layer [self.graphicsProjectQryLayer dataChanged]; }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.