xjrad

how can i get graphics from featurelayer

Discussion created by xjrad on Nov 9, 2011
Latest reply on Nov 16, 2011 by njarecha-esristaff
here is my code:

AGSFeatureLayer* featureLayer = [AGSFeatureLayer featureServiceLayerWithURL:[NSURL URLWithString:featureURL] mode:AGSFeatureLayerModeOnDemand];
[self.mapView addMapLayer:featureLayer withName:@"feature"];

- (void) mapView:(AGSMapView *)mapView didLoadLayerForLayerView:(UIView< AGSLayerView > *) layerView{
             if ([@"feature" isEqualToString:layerView.name]) {
  AGSFeatureLayer *featureLayer = (AGSFeatureLayer *)layerView.agsLayer;
  NSArray* ff = featureLayer.graphics;
  NSLog(@"%i", [ff count]);
}
}

the graphics array count always 0.Is there something I did is wrong?

Outcomes