In my app i add array of AGSFeatureLayer with function:
for(int i=0;i<[self.nome count];i++){
NSString *url = [NSString stringWithFormat:@%@/%i",servizio, i];
self.ServizioSITR = [AGSFeatureLayer featureServiceLayerWithURL:[NSURL URLWithString:url] mode:AGSFeatureLayerModeSnapshot];
[self.mapView addMapLayer:self.ServizioSITR withName:[self.nome objectAtIndex:i]];
}
I can not remove with function:
for(int i=0;i<[self.nome count];i++){
[self.mapView removeMapLayerWithName:[self.nome objectAtIndex:i]];
}
WHYYYYYYYYYYYY?
Please Help me