AnsweredAssumed Answered

expandByFactor

Question asked by jlchapman4 on Feb 24, 2012
Latest reply on Feb 24, 2012 by njarecha-esristaff
I'm trying to use expandByFactor but keep getting an error:
2012-02-24 08:27:25.274 MapTest[439:11f03] -[AGSEnvelope expandByFactor:]: unrecognized selector sent to instance 0xa04e170

The error message displays that it looking in AGSEnvelope instead of AGSMutableEnvelope.  But I'm putting the envelope into a AGSMutableEnvelope.  I've attached my code below.  Thanks for any ideas or solutions!

JC

- (void)queryTask:(AGSQueryTask *)queryTask operation:(NSOperation *)op didExecuteWithFeatureSetResult:(AGSFeatureSet *)featureSet
{

        AGSGraphic *graphic = [featureSet.features objectAtIndex:0];
        AGSMutableEnvelope *env = (AGSMutableEnvelope *)graphic.geometry.envelope;
        [env expandByFactor:2];
        [self.mapView zoomToEnvelope:env animated:YES];
}

Outcomes